Class: Person

Inherits:
Pal
  • Object
show all
Defined in:
lib/sw_info.rb

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

#aliasObject

Returns the value of attribute alias.



56
57
58
# File 'lib/sw_info.rb', line 56

def alias
  @alias
end

#dataObject

Returns the value of attribute data.



56
57
58
# File 'lib/sw_info.rb', line 56

def data
  @data
end

Instance Method Details

#birth_yearObject



58
59
60
# File 'lib/sw_info.rb', line 58

def birth_year
  @data['birth_year']
end

#eye_colorObject



62
63
64
# File 'lib/sw_info.rb', line 62

def eye_color
  @data['eye_color']
end

#genderObject



82
83
84
# File 'lib/sw_info.rb', line 82

def gender
  @data['gender']
end

#hair_colorObject



66
67
68
# File 'lib/sw_info.rb', line 66

def hair_color
  @data['hair_color']
end

#heightObject



74
75
76
# File 'lib/sw_info.rb', line 74

def height
  @data['height']
end

#massObject



78
79
80
# File 'lib/sw_info.rb', line 78

def mass
  @data['mass']
end

#skin_colorObject



70
71
72
# File 'lib/sw_info.rb', line 70

def skin_color
  @data['skin_color']
end