class Cucumber::Messages::Step
Represents the Step
message in Cucumber’s message protocol.
A step
Attributes
Unique ID to be able to reference the Step
from PickleStep
The location of the steps’ ‘keyword`
Public Class Methods
Source
# File lib/cucumber/messages.deserializers.rb, line 351 def self.from_h(hash) return nil if hash.nil? self.new( location: Location.from_h(hash[:location]), keyword: hash[:keyword], text: hash[:text], doc_string: DocString.from_h(hash[:docString]), data_table: DataTable.from_h(hash[:dataTable]), id: hash[:id], ) end
Returns a new Step
from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.
Cucumber::Messages::Step.from_h(some_hash) # => #<Cucumber::Messages::Step:0x... ...>
Source
# File lib/cucumber/messages.dtos.rb, line 673 def initialize( location: Location.new, keyword: '', text: '', doc_string: nil, data_table: nil, id: '' ) @location = location @keyword = keyword @text = text @doc_string = doc_string @data_table = data_table @id = id end