Class: INatGet::Data::Helper::Field::ScalarModel Private

Inherits:
Scalar show all
Defined in:
lib/inat-get/data/helpers/defs/scalarmodel.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

#helper, #key

Instance Method Summary collapse

Methods inherited from Scalar

#valid?

Methods inherited from INatGet::Data::Helper::Field

#prepare, #to_sequel, #valid?

Constructor Details

#initialize(helper, key, check) ⇒ ScalarModel

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 ScalarModel.



7
8
9
# File 'lib/inat-get/data/helpers/defs/scalarmodel.rb', line 7

def initialize helper, key, check
  super helper, key, check
end

Instance Method Details

#to_api(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/scalarmodel.rb', line 11

def to_api value
  { "#{ key }_id".to_sym => value.id }
end