Class: InOrder::Aux::PolyFind
- Inherits:
-
Object
- Object
- InOrder::Aux::PolyFind
- Defined in:
- app/models/in_order/aux/poly_find.rb
Instance Attribute Summary collapse
-
#poly_key ⇒ Object
Returns the value of attribute poly_key.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(*args) ⇒ PolyFind
constructor
A new instance of PolyFind.
Constructor Details
Instance Attribute Details
#poly_key ⇒ Object
Returns the value of attribute poly_key.
5 6 7 |
# File 'app/models/in_order/aux/poly_find.rb', line 5 def poly_key @poly_key end |
Class Method Details
.call(keys) ⇒ Object
17 18 19 20 |
# File 'app/models/in_order/aux/poly_find.rb', line 17 def self.call(keys) (keys || []).map {|key| new(key).call } .compact end |
Instance Method Details
#call ⇒ Object
13 14 15 |
# File 'app/models/in_order/aux/poly_find.rb', line 13 def call poly_key.type.constantize.find poly_key.id if poly_key.valid? end |