Method: OpenDictionary::PartOfSpeech#initialize
- Defined in:
- lib/open_dictionary/part_of_speech.rb
#initialize(data) ⇒ PartOfSpeech
Returns a new instance of PartOfSpeech.
5 6 7 8 |
# File 'lib/open_dictionary/part_of_speech.rb', line 5 def initialize(data) @description = data['description'] @definition_groups = data['definitionGroups'].map { |group| DefinitionGroup.new(group) } end |