Module: Cucumber::Core::Gherkin::Writer::HasOptionsInitializer

Included in:
Background, Examples, Feature, Scenario, ScenarioOutline, Step
Defined in:
lib/cucumber/core/gherkin/writer/helpers.rb

Defined Under Namespace

Modules: HasDefaultKeyword

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



7
8
9
# File 'lib/cucumber/core/gherkin/writer/helpers.rb', line 7

def self.included(base)
  base.extend HasDefaultKeyword
end

Instance Method Details

#initialize(*args) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/cucumber/core/gherkin/writer/helpers.rb', line 14

def initialize(*args)
  @comments = args.shift if args.first.is_a?(Array)
  @comments ||= []
  @options = args.pop if args.last.is_a?(Hash)
  @options ||= {}
  @name = args.first
end