Class: Cucumber::TagExpressions::And

Inherits:
Object
  • Object
show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-tag-expressions-4.1.0/lib/cucumber/tag_expressions/expressions.rb

Overview

And expression node

Instance Method Summary collapse

Constructor Details

#initialize(left, right) ⇒ And

Returns a new instance of And.



51
52
53
54
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-tag-expressions-4.1.0/lib/cucumber/tag_expressions/expressions.rb', line 51

def initialize(left, right)
  @left = left
  @right = right
end

Instance Method Details

#evaluate(variables) ⇒ Object



56
57
58
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-tag-expressions-4.1.0/lib/cucumber/tag_expressions/expressions.rb', line 56

def evaluate(variables)
  @left.evaluate(variables) && @right.evaluate(variables)
end

#to_sObject



60
61
62
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-tag-expressions-4.1.0/lib/cucumber/tag_expressions/expressions.rb', line 60

def to_s
  "( #{@left} and #{@right} )"
end