Class: DictClient::WordDefinitions::WordDefinition
- Inherits:
-
Struct
- Object
- Struct
- DictClient::WordDefinitions::WordDefinition
- Defined in:
- lib/dict_client/responses.rb
Constant Summary collapse
- BAR =
('-' * 76) + "\n"
Instance Attribute Summary collapse
-
#definition ⇒ Object
Returns the value of attribute definition.
-
#dictionary_description ⇒ Object
Returns the value of attribute dictionary_description.
-
#dictionary_name ⇒ Object
Returns the value of attribute dictionary_name.
-
#word ⇒ Object
Returns the value of attribute word.
Instance Method Summary collapse
Instance Attribute Details
#definition ⇒ Object
Returns the value of attribute definition
118 119 120 |
# File 'lib/dict_client/responses.rb', line 118 def definition @definition end |
#dictionary_description ⇒ Object
Returns the value of attribute dictionary_description
118 119 120 |
# File 'lib/dict_client/responses.rb', line 118 def dictionary_description @dictionary_description end |
#dictionary_name ⇒ Object
Returns the value of attribute dictionary_name
118 119 120 |
# File 'lib/dict_client/responses.rb', line 118 def dictionary_name @dictionary_name end |
#word ⇒ Object
Returns the value of attribute word
118 119 120 |
# File 'lib/dict_client/responses.rb', line 118 def word @word end |
Instance Method Details
#to_s(n = nil) ⇒ Object
122 123 124 125 126 |
# File 'lib/dict_client/responses.rb', line 122 def to_s(n = nil) (n.nil? ? '' : "#{n}) ") + "#{dictionary_name} (#{dictionary_description}): #{word}\n" + BAR + definition + BAR end |