class Cucumber::Messages::PickleStep
Represents the PickleStep
message in Cucumber’s message protocol.
*
An executable step
Attributes
argument[R]
ast_node_ids[R]
References the IDs of the source of the step. For Gherkin, this can be
the ID of a Step, and possibly also the ID of a TableRow
id[R]
A unique ID for the PickleStep
text[R]
type[R]
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
from_h(hash)
click to toggle source
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... ...>
# File lib/cucumber/messages.deserializers.rb, line 677 def self.from_h(hash) return nil if hash.nil? self.new( argument: PickleStepArgument.from_h(hash[:argument]), ast_node_ids: hash[:astNodeIds], id: hash[:id], type: hash[:type], text: hash[:text], ) end
new( argument: nil, ast_node_ids: [], id: '', type: nil, text: '' )
click to toggle source
# File lib/cucumber/messages.dtos.rb, line 1229 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 end