Class: Piglet::Field::SuffixExpression
- Inherits:
-
Object
- Object
- Piglet::Field::SuffixExpression
- Includes:
- Field
- Defined in:
- lib/piglet/field/suffix_expression.rb
Overview
:nodoc:
Constant Summary
Constants included from Field
Field::FUNCTIONS, Field::SYMBOLIC_OPERATORS
Instance Attribute Summary
Attributes included from Field
Instance Method Summary collapse
-
#initialize(operator, expression, options = nil) ⇒ SuffixExpression
constructor
A new instance of SuffixExpression.
- #simple? ⇒ Boolean
- #to_s ⇒ Object
Methods included from Field
#and, #as, #cast, #diff, #empty?, #matches, #ne, #neg, #not, #not_null?, #null?, #or
Constructor Details
#initialize(operator, expression, options = nil) ⇒ SuffixExpression
Returns a new instance of SuffixExpression.
8 9 10 11 12 |
# File 'lib/piglet/field/suffix_expression.rb', line 8 def initialize(operator, expression, =nil) ||= {} @operator, @expression = operator, expression @type = [:type] || expression.type end |
Instance Method Details
#simple? ⇒ Boolean
14 15 16 |
# File 'lib/piglet/field/suffix_expression.rb', line 14 def simple? false end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/piglet/field/suffix_expression.rb', line 18 def to_s "#{parenthesise(@expression)} #{@operator}" end |