Class: Cucumber::Filters::GatedReceiver

Inherits:
Object
  • Object
show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/filters/gated_receiver.rb

Instance Method Summary collapse

Constructor Details

#initialize(receiver) ⇒ GatedReceiver

Returns a new instance of GatedReceiver.



6
7
8
9
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/filters/gated_receiver.rb', line 6

def initialize(receiver)
  @receiver = receiver
  @test_cases = []
end

Instance Method Details

#doneObject



16
17
18
19
20
21
22
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/filters/gated_receiver.rb', line 16

def done
  @test_cases.map do |test_case|
    test_case.describe_to(@receiver)
  end
  @receiver.done
  self
end

#test_case(test_case) ⇒ Object



11
12
13
14
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/filters/gated_receiver.rb', line 11

def test_case(test_case)
  @test_cases << test_case
  self
end