class Cucumber::Messages::Hook
Attributes
id[R]
name[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 458 def self.from_h(hash) return nil if hash.nil? self.new( id: hash[:id], name: hash[:name], source_reference: SourceReference.from_h(hash[:sourceReference]), tag_expression: hash[:tagExpression], ) end
new( id: '', name: nil, source_reference: SourceReference.new, tag_expression: nil )
click to toggle source
# File lib/cucumber/messages.dtos.rb, line 841 def initialize( id: '', name: nil, source_reference: SourceReference.new, tag_expression: nil ) @id = id @name = name @source_reference = source_reference @tag_expression = tag_expression end