Class: KanjiMaster::Person

Inherits:
Object
  • Object
show all
Defined in:
lib/kanji_master/person.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(person) ⇒ Person

Returns a new instance of Person.



13
14
15
16
17
18
19
20
21
22
# File 'lib/kanji_master/person.rb', line 13

def initialize(person)
  @name           = person['name']
  @name_kana      = person['name_kana']
  @gender         = person['gender']
  @bloodtype      = person['bloodtype']
  @birthday       = person['birthday']
  @zip            = person['zip']
  @address        = person['address']
  @address_kata   = person['address_kata']
end

Instance Attribute Details

#addressObject

Returns the value of attribute address.



11
12
13
# File 'lib/kanji_master/person.rb', line 11

def address
  @address
end

#address_kataObject

Returns the value of attribute address_kata.



11
12
13
# File 'lib/kanji_master/person.rb', line 11

def address_kata
  @address_kata
end

#birthdayObject

Returns the value of attribute birthday.



11
12
13
# File 'lib/kanji_master/person.rb', line 11

def birthday
  @birthday
end

#bloodtypeObject

Returns the value of attribute bloodtype.



11
12
13
# File 'lib/kanji_master/person.rb', line 11

def bloodtype
  @bloodtype
end

#genderObject

Returns the value of attribute gender.



11
12
13
# File 'lib/kanji_master/person.rb', line 11

def gender
  @gender
end

#nameObject

Returns the value of attribute name.



11
12
13
# File 'lib/kanji_master/person.rb', line 11

def name
  @name
end

#name_kanaObject

Returns the value of attribute name_kana.



11
12
13
# File 'lib/kanji_master/person.rb', line 11

def name_kana
  @name_kana
end

#zipObject

Returns the value of attribute zip.



11
12
13
# File 'lib/kanji_master/person.rb', line 11

def zip
  @zip
end

Class Method Details

.dataObject



8
9
10
# File 'lib/kanji_master/person.rb', line 8

def self.data
  @data['persons']['person']
end