Class: Chirp::And

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

Instance Method Summary collapse

Methods inherited from FSExpression

#&, #|, #~

Constructor Details

#initialize(exp1, exp2) ⇒ And

Returns a new instance of And.



102
103
104
105
# File 'lib/chirp/fs_expression.rb', line 102

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

Instance Method Details

#evaluate(path) ⇒ Object



107
108
109
# File 'lib/chirp/fs_expression.rb', line 107

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