Class: Rookout::Augs::Conditions::Condition

Inherits:
Object
  • Object
show all
Defined in:
lib/rookout/augs/conditions/condition.rb

Instance Method Summary collapse

Constructor Details

#initialize(condition) ⇒ Condition

Returns a new instance of Condition.



7
8
9
# File 'lib/rookout/augs/conditions/condition.rb', line 7

def initialize condition
  @path = Processor::Paths::ArithmeticPath.new condition
end

Instance Method Details

#evaluate(namespace) ⇒ Object



11
12
13
# File 'lib/rookout/augs/conditions/condition.rb', line 11

def evaluate namespace
  @path.read_from(namespace).obj == true
end