Class: INatGet::Data::Helper::Field::Taxon Private
- Inherits:
-
Models
- Object
- INatGet::Data::Helper::Field
- Set
- Models
- INatGet::Data::Helper::Field::Taxon
- Defined in:
- lib/inat-get/data/helpers/defs/taxon.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::Helper::Field
Instance Method Summary collapse
-
#initialize(helper, key) ⇒ Taxon
constructor
private
A new instance of Taxon.
- #prepare(value) ⇒ Object private
- #to_sequel(value) ⇒ Object private
Methods inherited from Models
Methods inherited from Set
Methods inherited from INatGet::Data::Helper::Field
Constructor Details
#initialize(helper, key) ⇒ Taxon
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 Taxon.
7 8 9 |
# File 'lib/inat-get/data/helpers/defs/taxon.rb', line 7 def initialize helper, key super helper, key, INatGet::Data::Model::Taxon end |
Instance Method Details
#prepare(value) ⇒ 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.
11 12 13 |
# File 'lib/inat-get/data/helpers/defs/taxon.rb', line 11 def prepare value INatGet::Data::Model::Taxon::compact_set(*super(value)) end |
#to_sequel(value) ⇒ 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.
15 16 17 18 |
# File 'lib/inat-get/data/helpers/defs/taxon.rb', line 15 def to_sequel value value = [ value ] unless value.is_a?(Enumerable) Sequel.|( *value.map { |v| { taxon: v.descendants_dataset } } ) end |