Class: INatGet::Data::Helper::Field Private
- Inherits:
-
Object
- Object
- INatGet::Data::Helper::Field
- Defined in:
- lib/inat-get/data/helpers/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.
Defined Under Namespace
Classes: Accuracy, Coordinate, DatePart, Has, Iconic, Identified, Ids, Licensed, Licenses, Location, Models, Period, Place, Project, Range, Rank, Scalar, ScalarCoord, ScalarLocation, ScalarModel, Set, Taxon, Verifiable
Instance Attribute Summary collapse
- #helper ⇒ INatGet::Data::Helper readonly private
- #key ⇒ Symbol readonly private
Instance Method Summary collapse
-
#initialize(helper, key) ⇒ Field
constructor
private
A new instance of Field.
- #prepare(value) ⇒ Hash, Object private
- #to_api(value) ⇒ Hash, Object private
- #to_sequel(value) ⇒ Sequel::SQL::Expression private
- #valid?(value) ⇒ Boolean private
Constructor Details
#initialize(helper, key) ⇒ Field
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 Field.
19 20 21 22 |
# File 'lib/inat-get/data/helpers/defs.rb', line 19 def initialize helper, key @helper = helper @key = key end |
Instance Attribute Details
#helper ⇒ INatGet::Data::Helper (readonly)
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.
17 18 19 |
# File 'lib/inat-get/data/helpers/defs.rb', line 17 def helper @helper end |
#key ⇒ Symbol (readonly)
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.
14 15 16 |
# File 'lib/inat-get/data/helpers/defs.rb', line 14 def key @key end |
Instance Method Details
#prepare(value) ⇒ Hash, 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.
30 31 32 |
# File 'lib/inat-get/data/helpers/defs.rb', line 30 def prepare value value end |
#to_api(value) ⇒ Hash, 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.
35 36 37 |
# File 'lib/inat-get/data/helpers/defs.rb', line 35 def to_api value value end |
#to_sequel(value) ⇒ Sequel::SQL::Expression
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.
40 41 42 |
# File 'lib/inat-get/data/helpers/defs.rb', line 40 def to_sequel value { @key => value } end |
#valid?(value) ⇒ Boolean
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.
25 26 27 |
# File 'lib/inat-get/data/helpers/defs.rb', line 25 def valid? value raise NotImplementedError, "Not implemented method 'valid?' for abstract class", caller_locations end |