Class: Morphy::Morphy
- Inherits:
-
Object
- Object
- Morphy::Morphy
- Defined in:
- lib/morphy.rb
Instance Method Summary collapse
-
#initialize ⇒ Morphy
constructor
A new instance of Morphy.
- #query(word) ⇒ Object
- #to_s ⇒ Object
Constructor Details
Instance Method Details
#query(word) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/morphy.rb', line 12 def query(word) results = @dawg.query(word) results = results.map do |result| result = result.to_s word, para_id, index = result.split(' ') Word.new(word, para_id, index) end results end |
#to_s ⇒ Object
22 23 24 |
# File 'lib/morphy.rb', line 22 def to_s "Morphy" end |