Class: DataShift::InboundData::LookupSupport
- Inherits:
-
Object
- Object
- DataShift::InboundData::LookupSupport
- Defined in:
- lib/datashift/inbound_data/lookup_support.rb
Overview
Klass.where( @field => @where_value)
Instance Attribute Summary collapse
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#where_value ⇒ Object
readonly
Returns the value of attribute where_value.
Instance Method Summary collapse
- #find ⇒ Object
-
#initialize(klass, in_name, where_value) ⇒ LookupSupport
constructor
A new instance of LookupSupport.
Constructor Details
#initialize(klass, in_name, where_value) ⇒ LookupSupport
Returns a new instance of LookupSupport.
20 21 22 23 24 |
# File 'lib/datashift/inbound_data/lookup_support.rb', line 20 def initialize(klass, in_name, where_value) @klass = klass @field = in_name @where_value = where_value end |
Instance Attribute Details
#field ⇒ Object (readonly)
Returns the value of attribute field.
18 19 20 |
# File 'lib/datashift/inbound_data/lookup_support.rb', line 18 def field @field end |
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
18 19 20 |
# File 'lib/datashift/inbound_data/lookup_support.rb', line 18 def klass @klass end |
#where_value ⇒ Object (readonly)
Returns the value of attribute where_value.
18 19 20 |
# File 'lib/datashift/inbound_data/lookup_support.rb', line 18 def where_value @where_value end |
Instance Method Details
#find ⇒ Object
26 27 28 |
# File 'lib/datashift/inbound_data/lookup_support.rb', line 26 def find klass.where( field => where_value ) end |