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