Class: Imasgen::Name
- Inherits:
-
Object
- Object
- Imasgen::Name
- Defined in:
- lib/imasgen/name.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#first ⇒ Object
readonly
Returns the value of attribute first.
-
#last ⇒ Object
readonly
Returns the value of attribute last.
Instance Method Summary collapse
- #hiragana ⇒ Object
-
#initialize(namedata) ⇒ Name
constructor
A new instance of Name.
- #kanji ⇒ Object
- #katakana ⇒ Object
- #romaji ⇒ Object
- #to_s ⇒ Object
- #to_str ⇒ Object
Constructor Details
Instance Attribute Details
#first ⇒ Object (readonly)
Returns the value of attribute first.
6 7 8 |
# File 'lib/imasgen/name.rb', line 6 def first @first end |
#last ⇒ Object (readonly)
Returns the value of attribute last.
6 7 8 |
# File 'lib/imasgen/name.rb', line 6 def last @last end |
Instance Method Details
#hiragana ⇒ Object
26 27 28 |
# File 'lib/imasgen/name.rb', line 26 def hiragana "#{@last.hiragana} #{@first.hiragana}" end |
#kanji ⇒ Object
22 23 24 |
# File 'lib/imasgen/name.rb', line 22 def kanji "#{@last.kanji} #{@first.kanji}" end |
#katakana ⇒ Object
30 31 32 |
# File 'lib/imasgen/name.rb', line 30 def katakana "#{@last.katakana} #{@first.katakana}" end |
#romaji ⇒ Object
34 35 36 |
# File 'lib/imasgen/name.rb', line 34 def romaji "#{@first.romaji} #{@last.romaji}" end |
#to_s ⇒ Object
14 15 16 |
# File 'lib/imasgen/name.rb', line 14 def to_s kanji end |
#to_str ⇒ Object
18 19 20 |
# File 'lib/imasgen/name.rb', line 18 def to_str kanji end |