Class: Rhymera::Rhyme
- Inherits:
-
Object
- Object
- Rhymera::Rhyme
- Defined in:
- lib/rhymera/rhyme.rb
Overview
converts RhymeBrain json to object
Instance Attribute Summary collapse
-
#syllables ⇒ Object
readonly
Returns the value of attribute syllables.
-
#word ⇒ Object
readonly
Returns the value of attribute word.
Instance Method Summary collapse
-
#initialize(word:, syllables:) ⇒ Rhyme
constructor
A new instance of Rhyme.
Constructor Details
#initialize(word:, syllables:) ⇒ Rhyme
Returns a new instance of Rhyme.
6 7 8 9 |
# File 'lib/rhymera/rhyme.rb', line 6 def initialize(word:, syllables:) @word = word @syllables = syllables end |
Instance Attribute Details
#syllables ⇒ Object (readonly)
Returns the value of attribute syllables.
4 5 6 |
# File 'lib/rhymera/rhyme.rb', line 4 def syllables @syllables end |
#word ⇒ Object (readonly)
Returns the value of attribute word.
4 5 6 |
# File 'lib/rhymera/rhyme.rb', line 4 def word @word end |