Class: INatGet::Data::Parser::Part::Assoc Private

Inherits:
INatGet::Data::Parser::Part show all
Defined in:
lib/inat-get/data/parsers/defs.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.

Direct Known Subclasses

AssModel, Children, Links, PrjRules, PrjSearch

Instance Attribute Summary

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

#parser

Instance Method Summary collapse

Constructor Details

#initialize(parser, name, model:, source: nil, source_ids: nil) ⇒ Assoc

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.

Returns a new instance of Assoc.



21
22
23
24
25
26
27
# File 'lib/inat-get/data/parsers/defs.rb', line 21

def initialize parser, name, model:, source: nil, source_ids: nil
  super parser
  @name = name
  @model = model
  @source = source || @name
  @source_ids = source_ids || singular_ids(@source)
end

Instance Method Details

#parse(target, source) ⇒ Hash?

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.

Returns:

  • (Hash, nil)

Raises:

  • (NotImplementedError)


30
# File 'lib/inat-get/data/parsers/defs.rb', line 30

def parse(target, source) = raise NotImplementedError, "Not implemented method 'parse' in abstract class", caller_locations