class Cucumber::Messages::Hook
#
#
Represents the Hook message in Cucumber’s message protocol.
#
def self.from_h(hash)
Cucumber::Messages::Hook.from_h(some_hash) # => #
corresponding snake_cased attributes.
If the hash keys are camelCased, they are properly assigned to the
Returns a new Hook from the given hash.
#
def self.from_h(hash) return nil if hash.nil? new( id: hash[:id], name: hash[:name], source_reference: SourceReference.from_h(hash[:sourceReference]), tag_expression: hash[:tagExpression], type: hash[:type] ) end
def initialize(
def initialize( id: '', name: nil, source_reference: SourceReference.new, tag_expression: nil, type: nil ) @id = id @name = name @source_reference = source_reference @tag_expression = tag_expression @type = type super() end