Class: Cucumber::Messages::TestStep
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb
Overview
Represents the TestStep message in Cucumber’s message protocol.
*
A `TestStep` is derived from either a `PickleStep`
combined with a `StepDefinition`, or from a `Hook`.
Instance Attribute Summary collapse
-
#hook_id ⇒ Object
readonly
Pointer to the ‘Hook` (if derived from a Hook).
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#pickle_step_id ⇒ Object
readonly
Pointer to the ‘PickleStep` (if derived from a `PickleStep`).
-
#step_definition_ids ⇒ Object
readonly
Pointer to all the matching ‘StepDefinition`s (if derived from a `PickleStep`).
-
#step_match_arguments_lists ⇒ Object
readonly
A list of list of StepMatchArgument (if derived from a ‘PickleStep`).
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new TestStep from the given hash.
Instance Method Summary collapse
-
#initialize(hook_id: nil, id: '', pickle_step_id: nil, step_definition_ids: nil, step_match_arguments_lists: nil) ⇒ TestStep
constructor
A new instance of TestStep.
Methods included from Message::Utils
Methods included from Message::Serialization
Methods included from Message::Deserialization
Constructor Details
#initialize(hook_id: nil, id: '', pickle_step_id: nil, step_definition_ids: nil, step_match_arguments_lists: nil) ⇒ TestStep
Returns a new instance of TestStep.
1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1612 def initialize( hook_id: nil, id: '', pickle_step_id: nil, step_definition_ids: nil, step_match_arguments_lists: nil ) @hook_id = hook_id @id = id @pickle_step_id = pickle_step_id @step_definition_ids = step_definition_ids @step_match_arguments_lists = step_match_arguments_lists end |
Instance Attribute Details
#hook_id ⇒ Object (readonly)
Pointer to the ‘Hook` (if derived from a Hook)
1591 1592 1593 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1591 def hook_id @hook_id end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
1593 1594 1595 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1593 def id @id end |
#pickle_step_id ⇒ Object (readonly)
Pointer to the ‘PickleStep` (if derived from a `PickleStep`)
1598 1599 1600 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1598 def pickle_step_id @pickle_step_id end |
#step_definition_ids ⇒ Object (readonly)
Pointer to all the matching ‘StepDefinition`s (if derived from a `PickleStep`)
1603 1604 1605 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1603 def step_definition_ids @step_definition_ids end |
#step_match_arguments_lists ⇒ Object (readonly)
A list of list of StepMatchArgument (if derived from a ‘PickleStep`).
Each element represents a matching step definition. A size of 0 means `UNDEFINED`,
and a size of 2+ means `AMBIGUOUS`
1610 1611 1612 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1610 def step_match_arguments_lists @step_match_arguments_lists end |
Class Method Details
.from_h(hash) ⇒ Object
981 982 983 984 985 986 987 988 989 990 991 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 981 def self.from_h(hash) return nil if hash.nil? self.new( hook_id: hash[:hookId], id: hash[:id], pickle_step_id: hash[:pickleStepId], step_definition_ids: hash[:stepDefinitionIds], step_match_arguments_lists: hash[:stepMatchArgumentsLists]&.map { |item| StepMatchArgumentsList.from_h(item) }, ) end |