Class: QDA::Query::LogicalExpression

Inherits:
Object
  • Object
show all
Defined in:
lib/weft/query.rb

Direct Known Subclasses

AND, AND_NOT, OR

Instance Method Summary collapse

Constructor Details

#initialize(arg_1, arg_2) ⇒ LogicalExpression

Returns a new instance of LogicalExpression.



132
133
134
# File 'lib/weft/query.rb', line 132

def initialize(arg_1, arg_2)
  @arg_1, @arg_2 = arg_1, arg_2
end

Instance Method Details

#to_aObject



136
137
138
# File 'lib/weft/query.rb', line 136

def to_a()
  [ @arg_1.to_a, self, @arg_2.to_a ]
end

#val_1Object



140
141
142
# File 'lib/weft/query.rb', line 140

def val_1()
  @arg_1.respond_to?(:calculate) ? @arg_1.calculate : @arg_1
end

#val_2Object



144
145
146
# File 'lib/weft/query.rb', line 144

def val_2()
  @arg_2.respond_to?(:calculate) ? @arg_2.calculate : @arg_2      
end