class Cucumber::Messages::StepDefinitionPattern
Represents the StepDefinitionPattern
message in Cucumber’s message protocol.
Attributes
source[R]
type[R]
Public Class Methods
from_h(hash)
click to toggle source
Returns a new StepDefinitionPattern
from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.
Cucumber::Messages::StepDefinitionPattern.from_h(some_hash) # => #<Cucumber::Messages::StepDefinitionPattern:0x... ...>
# File lib/cucumber/messages/step_definition_pattern.rb, line 31 def self.from_h(hash) return nil if hash.nil? new( source: hash[:source], type: hash[:type] ) end
new( source: '', type: StepDefinitionPatternType::CUCUMBER_EXPRESSION )
click to toggle source
Calls superclass method
# File lib/cucumber/messages/step_definition_pattern.rb, line 15 def initialize( source: '', type: StepDefinitionPatternType::CUCUMBER_EXPRESSION ) @source = source @type = type super() end