Class: Rhymera::Rhyme

Inherits:
Object
  • Object
show all
Defined in:
lib/rhymera/rhyme.rb

Overview

converts RhymeBrain json to object

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#syllablesObject (readonly)

Returns the value of attribute syllables.



4
5
6
# File 'lib/rhymera/rhyme.rb', line 4

def syllables
  @syllables
end

#wordObject (readonly)

Returns the value of attribute word.



4
5
6
# File 'lib/rhymera/rhyme.rb', line 4

def word
  @word
end