class Cucumber::Messages::StepDefinition
Attributes
Public Class Methods
Source
# File lib/cucumber/messages.deserializers.rb, line 858 def self.from_h(hash) return nil if hash.nil? self.new( id: hash[:id], pattern: StepDefinitionPattern.from_h(hash[:pattern]), source_reference: SourceReference.from_h(hash[:sourceReference]), ) end
Returns a new StepDefinition
from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.
Cucumber::Messages::StepDefinition.from_h(some_hash) # => #<Cucumber::Messages::StepDefinition:0x... ...>
Source
# File lib/cucumber/messages.dtos.rb, line 1433 def initialize( id: '', pattern: StepDefinitionPattern.new, source_reference: SourceReference.new ) @id = id @pattern = pattern @source_reference = source_reference end