Class: Rubiderella::Person::Name
- Inherits:
-
Object
- Object
- Rubiderella::Person::Name
- Defined in:
- lib/rubiderella/person/name.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#first ⇒ Object
readonly
Returns the value of attribute first.
-
#first_kana ⇒ Object
readonly
Returns the value of attribute first_kana.
-
#last ⇒ Object
readonly
Returns the value of attribute last.
-
#last_kana ⇒ Object
readonly
Returns the value of attribute last_kana.
Instance Method Summary collapse
- #full ⇒ Object
- #full_kana ⇒ Object
-
#initialize(args) ⇒ Name
constructor
A new instance of Name.
Constructor Details
#initialize(args) ⇒ Name
Returns a new instance of Name.
8 9 10 11 12 13 |
# File 'lib/rubiderella/person/name.rb', line 8 def initialize(args) @last = args[:last] @last_kana = args[:last_kana] @first = args[:first] @first_kana = args[:first_kana] end |
Instance Attribute Details
#first ⇒ Object (readonly)
Returns the value of attribute first.
6 7 8 |
# File 'lib/rubiderella/person/name.rb', line 6 def first @first end |
#first_kana ⇒ Object (readonly)
Returns the value of attribute first_kana.
6 7 8 |
# File 'lib/rubiderella/person/name.rb', line 6 def first_kana @first_kana end |
#last ⇒ Object (readonly)
Returns the value of attribute last.
6 7 8 |
# File 'lib/rubiderella/person/name.rb', line 6 def last @last end |
#last_kana ⇒ Object (readonly)
Returns the value of attribute last_kana.
6 7 8 |
# File 'lib/rubiderella/person/name.rb', line 6 def last_kana @last_kana end |
Instance Method Details
#full ⇒ Object
15 16 17 |
# File 'lib/rubiderella/person/name.rb', line 15 def full @last + @first end |
#full_kana ⇒ Object
19 20 21 |
# File 'lib/rubiderella/person/name.rb', line 19 def full_kana @last_kana + @first_kana end |