Class: Manabu::Guardian
Instance Attribute Summary collapse
-
#birth_date ⇒ Object
Returns the value of attribute birth_date.
-
#gender ⇒ Object
Returns the value of attribute gender.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#name_reading ⇒ Object
Returns the value of attribute name_reading.
-
#surname ⇒ Object
Returns the value of attribute surname.
-
#surname_reading ⇒ Object
Returns the value of attribute surname_reading.
Instance Method Summary collapse
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Manabu::Resource
Instance Attribute Details
#birth_date ⇒ Object
Returns the value of attribute birth_date.
5 6 7 |
# File 'lib/manabu/guardian.rb', line 5 def birth_date @birth_date end |
#gender ⇒ Object
Returns the value of attribute gender.
5 6 7 |
# File 'lib/manabu/guardian.rb', line 5 def gender @gender end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/manabu/guardian.rb', line 5 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/manabu/guardian.rb', line 5 def name @name end |
#name_reading ⇒ Object
Returns the value of attribute name_reading.
5 6 7 |
# File 'lib/manabu/guardian.rb', line 5 def name_reading @name_reading end |
#surname ⇒ Object
Returns the value of attribute surname.
5 6 7 |
# File 'lib/manabu/guardian.rb', line 5 def surname @surname end |
#surname_reading ⇒ Object
Returns the value of attribute surname_reading.
5 6 7 |
# File 'lib/manabu/guardian.rb', line 5 def surname_reading @surname_reading end |
Instance Method Details
#fill(**info) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/manabu/guardian.rb', line 7 def fill(**info) @id = info.fetch(:id, @id) @surname = info.fetch(:surname, @surname) @name = info.fetch(:name, @name) @name_reading = info.fetch(:name_reading, @name_reading) @surname_reading = info.fetch(:surname_reading, @surname_reading) @birth_date = info.fetch(:birth_date, @birth_date) @gender = info.fetch(:gender, @gender) self end |