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.
69
70
71
|
# File 'lib/sw_info.rb', line 69
def alias
@alias
end
|
#data ⇒ Object
Returns the value of attribute data.
69
70
71
|
# File 'lib/sw_info.rb', line 69
def data
@data
end
|
Instance Method Details
#birth_year ⇒ Object
71
72
73
|
# File 'lib/sw_info.rb', line 71
def birth_year
@data['birth_year']
end
|
#eye_color ⇒ Object
75
76
77
|
# File 'lib/sw_info.rb', line 75
def eye_color
@data['eye_color']
end
|
#gender ⇒ Object
95
96
97
|
# File 'lib/sw_info.rb', line 95
def gender
@data['gender']
end
|
#hair_color ⇒ Object
79
80
81
|
# File 'lib/sw_info.rb', line 79
def hair_color
@data['hair_color']
end
|
#height ⇒ Object
87
88
89
|
# File 'lib/sw_info.rb', line 87
def height
@data['height']
end
|
#mass ⇒ Object
91
92
93
|
# File 'lib/sw_info.rb', line 91
def mass
@data['mass']
end
|
#skin_color ⇒ Object
83
84
85
|
# File 'lib/sw_info.rb', line 83
def skin_color
@data['skin_color']
end
|