class Cucumber::Core::Gherkin::AstBuilder::StepBuilder

Attributes

multiline_argument_builder[R]

Public Class Methods

new(*) click to toggle source
# File lib/cucumber/core/gherkin/ast_builder.rb, line 222
def initialize(*)
  super
  @multiline_argument_builder = attributes[:argument] ? argument_builder(attributes[:argument]) : nil
end

Public Instance Methods

children() click to toggle source
# File lib/cucumber/core/gherkin/ast_builder.rb, line 243
def children
  return [] unless multiline_argument_builder
  [multiline_argument_builder]
end
multiline_argument() click to toggle source
# File lib/cucumber/core/gherkin/ast_builder.rb, line 238
def multiline_argument
  return Ast::EmptyMultilineArgument.new unless multiline_argument_builder
  multiline_argument_builder.result
end
result(language) click to toggle source
# File lib/cucumber/core/gherkin/ast_builder.rb, line 227
def result(language)
  Ast::Step.new(
    language,
    location,
    comments,
    keyword,
    attributes[:text],
    multiline_argument
  )
end

Private Instance Methods

argument_builder(attributes) click to toggle source
# File lib/cucumber/core/gherkin/ast_builder.rb, line 250
def argument_builder(attributes)
  attributes[:type] == :DataTable ? DataTableBuilder.new(file, attributes) : DocStringBuilder.new(file, attributes) 
end