Class: Cucumber::CucumberExpressions::GeneratedExpression
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-cucumber-expressions-15.2.0/lib/cucumber/cucumber_expressions/generated_expression.rb
Instance Attribute Summary collapse
-
#parameter_types ⇒ Object
readonly
Returns the value of attribute parameter_types.
Instance Method Summary collapse
-
#initialize(expression_template, parameters_types) ⇒ GeneratedExpression
constructor
A new instance of GeneratedExpression.
- #parameter_names ⇒ Object
- #source ⇒ Object
Constructor Details
#initialize(expression_template, parameters_types) ⇒ GeneratedExpression
Returns a new instance of GeneratedExpression.
6 7 8 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-cucumber-expressions-15.2.0/lib/cucumber/cucumber_expressions/generated_expression.rb', line 6 def initialize(expression_template, parameters_types) @expression_template, @parameter_types = expression_template, parameters_types end |
Instance Attribute Details
#parameter_types ⇒ Object (readonly)
Returns the value of attribute parameter_types.
4 5 6 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-cucumber-expressions-15.2.0/lib/cucumber/cucumber_expressions/generated_expression.rb', line 4 def parameter_types @parameter_types end |
Instance Method Details
#parameter_names ⇒ Object
14 15 16 17 18 19 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-cucumber-expressions-15.2.0/lib/cucumber/cucumber_expressions/generated_expression.rb', line 14 def parameter_names usage_by_type_name = Hash.new(0) @parameter_types.map do |t| get_parameter_name(t.name, usage_by_type_name) end end |
#source ⇒ Object
10 11 12 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-cucumber-expressions-15.2.0/lib/cucumber/cucumber_expressions/generated_expression.rb', line 10 def source sprintf(@expression_template, *@parameter_types.map(&:name)) end |