Class: OpenDictionary::DefinitionGroup
- Inherits:
-
Object
- Object
- OpenDictionary::DefinitionGroup
- Defined in:
- lib/open_dictionary/definition_group.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#entries ⇒ Object
readonly
Returns the value of attribute entries.
Instance Method Summary collapse
-
#initialize(data) ⇒ DefinitionGroup
constructor
A new instance of DefinitionGroup.
Constructor Details
#initialize(data) ⇒ DefinitionGroup
Returns a new instance of DefinitionGroup.
5 6 7 8 |
# File 'lib/open_dictionary/definition_group.rb', line 5 def initialize(data) @description = data['description'] @entries = data['entries'].map { |entry| DefinitionEntry.new(entry) } end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
3 4 5 |
# File 'lib/open_dictionary/definition_group.rb', line 3 def description @description end |
#entries ⇒ Object (readonly)
Returns the value of attribute entries.
3 4 5 |
# File 'lib/open_dictionary/definition_group.rb', line 3 def entries @entries end |