Class: Erlectricity::BooleanCondition

Inherits:
Condition
  • Object
show all
Defined in:
lib/erlectricity/conditions/boolean.rb

Instance Method Summary collapse

Methods inherited from Condition

for, #initialize

Constructor Details

This class inherits a constructor from Erlectricity::Condition

Instance Method Details

#binding_for(arg) ⇒ Object



7
8
9
# File 'lib/erlectricity/conditions/boolean.rb', line 7

def binding_for(arg)
  arg
end

#satisfies?(arg) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/erlectricity/conditions/boolean.rb', line 3

def satisfies?(arg)
  [TrueClass, FalseClass].include?(arg.class)
end