Method: Cucumber::StepMatch#format_args
- Defined in:
- lib/cucumber/step_match.rb
#format_args(format = lambda{|a| a}, &proc) ⇒ Object
Formats the matched arguments of the associated Step. This method is usually called from visitors, which render output.
The format can either be a String or a Proc.
If it is a String it should be a format string according to Kernel#sprinf, for example:
'<span class="param">%s</span></tt>'
If it is a Proc, it should take one argument and return the formatted argument, for example:
lambda { |param| "[#{param}]" }
43 44 45 |
# File 'lib/cucumber/step_match.rb', line 43 def format_args(format = lambda{|a| a}, &proc) @name_to_report || replace_arguments(@name_to_match, @step_arguments, format, &proc) end |