Class: DictClient::WordMatch
- Inherits:
-
SimpleResponse
- Object
- SimpleResponse
- DictClient::WordMatch
- Includes:
- Formattable
- Defined in:
- lib/dict_client/responses.rb
Instance Attribute Summary collapse
-
#matches ⇒ Object
readonly
Returns the value of attribute matches.
Instance Method Summary collapse
Methods included from Formattable
Methods inherited from SimpleResponse
Constructor Details
This class inherits a constructor from DictClient::SimpleResponse
Instance Attribute Details
#matches ⇒ Object (readonly)
Returns the value of attribute matches.
84 85 86 |
# File 'lib/dict_client/responses.rb', line 84 def matches @matches end |
Instance Method Details
#count ⇒ Object
93 94 95 |
# File 'lib/dict_client/responses.rb', line 93 def count @matches.size end |
#to_s ⇒ Object
86 87 88 89 90 91 |
# File 'lib/dict_client/responses.rb', line 86 def to_s max_key = longest @matches.map{|tuple| tuple[0] } max_value = longest @matches.map{|tuple| tuple[1] } print_formatted @matches, max_key, max_value end |