Class: Chirp::Or

Inherits:
FSExpression show all
Defined in:
lib/chirp/fs_expression.rb

Instance Method Summary collapse

Methods inherited from FSExpression

#&, #|, #~

Constructor Details

#initialize(exp1, exp2) ⇒ Or

Returns a new instance of Or.



113
114
115
116
# File 'lib/chirp/fs_expression.rb', line 113

def initialize(exp1, exp2)
  @exp1 = exp1
  @exp2 = exp2
end

Instance Method Details

#evaluate(path) ⇒ Object



118
119
120
# File 'lib/chirp/fs_expression.rb', line 118

def evaluate(path)
  @exp1.evaluate(path) || @exp2.evaluate(path)
end