class Cucumber::Messages::Step
#
A step
#
Represents the Step message in Cucumber’s message protocol.
#
def self.from_h(hash)
Cucumber::Messages::Step.from_h(some_hash) # => #
corresponding snake_cased attributes.
If the hash keys are camelCased, they are properly assigned to the
Returns a new Step from the given hash.
#
def self.from_h(hash) return nil if hash.nil? new( location: Location.from_h(hash[:location]), keyword: hash[:keyword], keyword_type: hash[:keywordType], text: hash[:text], doc_string: DocString.from_h(hash[:docString]), data_table: DataTable.from_h(hash[:dataTable]), id: hash[:id] ) end
def initialize(
def initialize( location: Location.new, keyword: '', keyword_type: nil, text: '', doc_string: nil, data_table: nil, id: '' ) @location = location @keyword = keyword @keyword_type = keyword_type @text = text @doc_string = doc_string @data_table = data_table @id = id super() end