class Cucumber::Runtime::SupportCode::StepInvoker
def initialize(support_code)
def initialize(support_code) @support_code = support_code end
def multiline_arg(step, location)
def multiline_arg(step, location) if argument = step[:argument] if argument[:type] == :DocString MultilineArgument.doc_string(argument[:content], argument[:content_type], location) else MultilineArgument::DataTable.from(argument[:rows].map { |row| row[:cells].map { |cell| cell[:value] } }) end else MultilineArgument.from(nil) end end
def step(step)
def step(step) location = Core::Ast::Location.of_caller @support_code.invoke_dynamic_step(step[:text], multiline_arg(step, location)) end
def steps(steps)
def steps(steps) steps.each { |step| step(step) } end