Class: PortableExpressions::Operand

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/portable_expressions/operand.rb

Overview

Used to wrap ‘operands` when evaluating an `Expression`. This allows us to “extend” the functionality of an object without polluting the app wide definition.

Instance Method Summary collapse

Instance Method Details

#and(other) ⇒ Object



7
8
9
# File 'lib/portable_expressions/operand.rb', line 7

def and(other)
  __getobj__ && other.__getobj__
end

#or(other) ⇒ Object



11
12
13
# File 'lib/portable_expressions/operand.rb', line 11

def or(other)
  __getobj__ || other.__getobj__
end