Class: Cucumber::Messages::StepMatchArgumentsList
- Defined in:
- lib/cucumber/messages/step_match_arguments_list.rb
Overview
Represents the StepMatchArgumentsList message in Cucumber’s message protocol.
Instance Attribute Summary collapse
-
#step_match_arguments ⇒ Object
readonly
Returns the value of attribute step_match_arguments.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new StepMatchArgumentsList from the given hash.
Instance Method Summary collapse
-
#initialize(step_match_arguments: []) ⇒ StepMatchArgumentsList
constructor
A new instance of StepMatchArgumentsList.
Methods inherited from Message
camelize, from_json, #to_h, #to_json
Constructor Details
#initialize(step_match_arguments: []) ⇒ StepMatchArgumentsList
Returns a new instance of StepMatchArgumentsList.
13 14 15 16 17 18 |
# File 'lib/cucumber/messages/step_match_arguments_list.rb', line 13 def initialize( step_match_arguments: [] ) @step_match_arguments = step_match_arguments super() end |
Instance Attribute Details
#step_match_arguments ⇒ Object (readonly)
Returns the value of attribute step_match_arguments.
11 12 13 |
# File 'lib/cucumber/messages/step_match_arguments_list.rb', line 11 def step_match_arguments @step_match_arguments end |
Class Method Details
.from_h(hash) ⇒ Object
Returns a new StepMatchArgumentsList from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.
Cucumber::Messages::StepMatchArgumentsList.from_h(some_hash) # => #<Cucumber::Messages::StepMatchArgumentsList:0x... ...>
27 28 29 30 31 32 33 |
# File 'lib/cucumber/messages/step_match_arguments_list.rb', line 27 def self.from_h(hash) return nil if hash.nil? new( step_match_arguments: hash[:stepMatchArguments]&.map { |item| StepMatchArgument.from_h(item) } ) end |