Answer the question
In order to leave comments, you need to log in
How to write in yaml?
user:
name: Alex
weight:
value: 70
growth:
value: 80
age:
value: 35
def initialize(name)
parsed = YAML.load_file('characteristic.yml')
@name = parsed['player']['name']
@weight = parsed['player']['weight']['value']
@growth = parsed['player']['growth']['value']
@age = parsed['player']['age']['value']
end
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question