Class: SmqlToAR::ConditionTypes::Functions::Function
- Inherits:
-
Object
- Object
- SmqlToAR::ConditionTypes::Functions::Function
- Includes:
- Assertion
- Defined in:
- lib/smql_to_ar/condition_types.rb
Constant Summary collapse
- Name =
nil
- Expected =
[]
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#func ⇒ Object
readonly
Returns the value of attribute func.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(model, func, args) ⇒ Function
constructor
A new instance of Function.
Methods included from Assertion
Constructor Details
#initialize(model, func, args) ⇒ Function
Returns a new instance of Function.
418 419 420 |
# File 'lib/smql_to_ar/condition_types.rb', line 418 def initialize model, func, args @model, @func, @args = model, func, args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
406 407 408 |
# File 'lib/smql_to_ar/condition_types.rb', line 406 def args @args end |
#func ⇒ Object (readonly)
Returns the value of attribute func.
406 407 408 |
# File 'lib/smql_to_ar/condition_types.rb', line 406 def func @func end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
406 407 408 |
# File 'lib/smql_to_ar/condition_types.rb', line 406 def model @model end |
Class Method Details
.inspect ⇒ Object
413 414 415 |
# File 'lib/smql_to_ar/condition_types.rb', line 413 def inspect "#{self.name}( :name=>#{self::Name}, :expected=>#{self::Expected})" end |
.try_parse(model, func, args) ⇒ Object
409 410 411 |
# File 'lib/smql_to_ar/condition_types.rb', line 409 def try_parse model, func, args self.new model, func, args if self::Name === func and self::Expected.any? {|x| x === args } end |