Class: OpenDictionary::Etymology
- Inherits:
-
Object
- Object
- OpenDictionary::Etymology
- Defined in:
- lib/open_dictionary/etymology.rb
Instance Attribute Summary collapse
-
#adjectives ⇒ Object
readonly
Returns the value of attribute adjectives.
-
#adverbs ⇒ Object
readonly
Returns the value of attribute adverbs.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#letter ⇒ Object
readonly
Returns the value of attribute letter.
-
#nouns ⇒ Object
readonly
Returns the value of attribute nouns.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#prepositions ⇒ Object
readonly
Returns the value of attribute prepositions.
-
#verbs ⇒ Object
readonly
Returns the value of attribute verbs.
Instance Method Summary collapse
-
#initialize(data) ⇒ Etymology
constructor
A new instance of Etymology.
Constructor Details
#initialize(data) ⇒ Etymology
Returns a new instance of Etymology.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/open_dictionary/etymology.rb', line 6 def initialize(data) @description = data['description'] @nouns = parse_parts_of_speech(data['nouns']) @verbs = parse_parts_of_speech(data['verbs']) @adjectives = parse_parts_of_speech(data['adjectives']) @prepositions = parse_parts_of_speech(data['prepositions']) @adverbs = parse_parts_of_speech(data['adverbs']) @letter = parse_parts_of_speech(data['letter']) @number = parse_parts_of_speech(data['number']) end |
Instance Attribute Details
#adjectives ⇒ Object (readonly)
Returns the value of attribute adjectives.
3 4 5 |
# File 'lib/open_dictionary/etymology.rb', line 3 def adjectives @adjectives end |
#adverbs ⇒ Object (readonly)
Returns the value of attribute adverbs.
3 4 5 |
# File 'lib/open_dictionary/etymology.rb', line 3 def adverbs @adverbs end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
3 4 5 |
# File 'lib/open_dictionary/etymology.rb', line 3 def description @description end |
#letter ⇒ Object (readonly)
Returns the value of attribute letter.
3 4 5 |
# File 'lib/open_dictionary/etymology.rb', line 3 def letter @letter end |
#nouns ⇒ Object (readonly)
Returns the value of attribute nouns.
3 4 5 |
# File 'lib/open_dictionary/etymology.rb', line 3 def nouns @nouns end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
3 4 5 |
# File 'lib/open_dictionary/etymology.rb', line 3 def number @number end |
#prepositions ⇒ Object (readonly)
Returns the value of attribute prepositions.
3 4 5 |
# File 'lib/open_dictionary/etymology.rb', line 3 def prepositions @prepositions end |
#verbs ⇒ Object (readonly)
Returns the value of attribute verbs.
3 4 5 |
# File 'lib/open_dictionary/etymology.rb', line 3 def verbs @verbs end |