Class: Cql::Model::Query::UpdateExpression
- Inherits:
-
Expression
- Object
- Expression
- Cql::Model::Query::UpdateExpression
- Defined in:
- lib/cql/model/query/update_expression.rb
Constant Summary collapse
- OPERATORS =
Operators allowed in an update lambda
{ :+ => '+', :- => '-', :[]= => true # special treatment in #__build__ }.freeze
Instance Method Summary collapse
-
#initialize(&block) ⇒ UpdateExpression
constructor
A new instance of UpdateExpression.
- #inspect ⇒ Object
- #method_missing(token, *args) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(&block) ⇒ UpdateExpression
Returns a new instance of UpdateExpression.
14 15 16 17 18 19 20 |
# File 'lib/cql/model/query/update_expression.rb', line 14 def initialize(&block) @left = nil @operator = nil @right = nil instance_exec(&block) if block end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(token, *args) ⇒ Object
41 42 43 |
# File 'lib/cql/model/query/update_expression.rb', line 41 def method_missing(token, *args) __apply__(token, args) end |
Instance Method Details
#inspect ⇒ Object
28 29 30 |
# File 'lib/cql/model/query/update_expression.rb', line 28 def inspect __build__ end |
#to_s ⇒ Object
23 24 25 |
# File 'lib/cql/model/query/update_expression.rb', line 23 def to_s __build__ end |