Class: INatGet::Data::Parser::Part::PrjType Private

Inherits:
INatGet::Data::Parser::Part show all
Defined in:
lib/inat-get/data/parsers/defs/prjtype.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary

Attributes inherited from INatGet::Data::Parser::Part

#parser

Instance Method Summary collapse

Methods inherited from INatGet::Data::Parser::Part

#initialize

Constructor Details

This class inherits a constructor from INatGet::Data::Parser::Part

Instance Method Details

#parse(source) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



5
6
7
8
9
10
11
# File 'lib/inat-get/data/parsers/defs/prjtype.rb', line 5

def parse source
  result = {}
  result[:project_type]  = source[:project_type]
  result[:is_umbrella]   = source[:is_umbrella]
  result[:is_collection] = result[:project_type] == 'collection'
  result
end