Class: SmqlToAR::ConditionTypes::Functions
- Defined in:
- lib/smql_to_ar/condition_types.rb
Defined Under Namespace
Classes: Function, Limit, Offset, Order
Constant Summary collapse
- Operator =
':'
- Expected =
[String, Array, Hash, Numeric, nil]
Constants inherited from Condition
Instance Attribute Summary
Attributes inherited from Condition
Class Method Summary collapse
Methods inherited from Condition
#condition_build, #initialize, inspect, #inspect, try_parse, #verify, #verify_allowed, #verify_column
Methods included from Assertion
Constructor Details
This class inherits a constructor from SmqlToAR::ConditionTypes::Condition
Class Method Details
.new(model, col, val) ⇒ Object
479 480 481 482 483 484 485 486 487 488 489 |
# File 'lib/smql_to_ar/condition_types.rb', line 479 def self.new model, col, val r = nil constants.each do |c| next if [:Function, :Where, :Expected, :Operator].include? c c = const_get c next if Function === c or not c.respond_to?( :try_parse) r = c.try_parse model, col.first.to_sym, val break if r end r end |