Class: ActiveForce::Field
- Inherits:
-
Object
- Object
- ActiveForce::Field
- Defined in:
- lib/active_force/field.rb
Instance Attribute Summary collapse
-
#as ⇒ Object
Returns the value of attribute as.
-
#local_name ⇒ Object
Returns the value of attribute local_name.
-
#sfdc_name ⇒ Object
Returns the value of attribute sfdc_name.
Instance Method Summary collapse
-
#initialize(name, options = {}) ⇒ Field
constructor
A new instance of Field.
- #value_for_hash(value) ⇒ Object
Constructor Details
#initialize(name, options = {}) ⇒ Field
Returns a new instance of Field.
6 7 8 9 10 |
# File 'lib/active_force/field.rb', line 6 def initialize name, = {} self.local_name = name self.sfdc_name = [:sfdc_name] || [:from] || default_api_name self.as = [:as] || :string end |
Instance Attribute Details
#as ⇒ Object
Returns the value of attribute as.
4 5 6 |
# File 'lib/active_force/field.rb', line 4 def as @as end |
#local_name ⇒ Object
Returns the value of attribute local_name.
4 5 6 |
# File 'lib/active_force/field.rb', line 4 def local_name @local_name end |
#sfdc_name ⇒ Object
Returns the value of attribute sfdc_name.
4 5 6 |
# File 'lib/active_force/field.rb', line 4 def sfdc_name @sfdc_name end |
Instance Method Details
#value_for_hash(value) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/active_force/field.rb', line 12 def value_for_hash value case as when :datetime value&.to_fs(:iso8601) else value end end |