Class: Person
Overview
En esta clase voy a querer acceder a esa data dependiendo de la key que me pase y mostrar el atributo que se pida según el método llamado
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from Pal
all, find, #id, #initialize, #name, search_for_all, search_for_id, #to_s
Constructor Details
This class inherits a constructor from Pal
Instance Attribute Details
#alias ⇒ Object
Returns the value of attribute alias.
56
57
58
|
# File 'lib/sw_info.rb', line 56
def alias
@alias
end
|
#data ⇒ Object
Returns the value of attribute data.
56
57
58
|
# File 'lib/sw_info.rb', line 56
def data
@data
end
|
Instance Method Details
#birth_year ⇒ Object
58
59
60
|
# File 'lib/sw_info.rb', line 58
def birth_year
@data['birth_year']
end
|
#eye_color ⇒ Object
62
63
64
|
# File 'lib/sw_info.rb', line 62
def eye_color
@data['eye_color']
end
|
#gender ⇒ Object
82
83
84
|
# File 'lib/sw_info.rb', line 82
def gender
@data['gender']
end
|
#hair_color ⇒ Object
66
67
68
|
# File 'lib/sw_info.rb', line 66
def hair_color
@data['hair_color']
end
|
#height ⇒ Object
74
75
76
|
# File 'lib/sw_info.rb', line 74
def height
@data['height']
end
|
#mass ⇒ Object
78
79
80
|
# File 'lib/sw_info.rb', line 78
def mass
@data['mass']
end
|
#skin_color ⇒ Object
70
71
72
|
# File 'lib/sw_info.rb', line 70
def skin_color
@data['skin_color']
end
|