class Cucumber::Messages::PickleStep
Represents the PickleStep message in Cucumber’s message protocol.
An executable step
Attributes
A unique ID for the PickleStep
The context in which the step was specified: context (Given), action (When) or outcome (Then).
Note that the keywords ‘But` and `And` inherit their meaning from prior steps and the `*` ’keyword’ doesn’t have specific meaning (hence Unknown)
Public Class Methods
Source
# File lib/cucumber/messages/pickle_step.rb, line 57 def self.from_h(hash) return nil if hash.nil? new( argument: PickleStepArgument.from_h(hash[:argument]), ast_node_ids: hash[:astNodeIds], id: hash[:id], type: hash[:type], text: hash[:text] ) end
Returns a new PickleStep from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.
Cucumber::Messages::PickleStep.from_h(some_hash) # => #<Cucumber::Messages::PickleStep:0x... ...>
Source
# File lib/cucumber/messages/pickle_step.rb, line 35 def initialize( argument: nil, ast_node_ids: [], id: '', type: nil, text: '' ) @argument = argument @ast_node_ids = ast_node_ids @id = id @type = type @text = text super() end
Calls superclass method