class Cucumber::Messages::Hook
Attributes
Public Class Methods
Source
# 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
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... ...>
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