class Cucumber::Messages::Hook
Represents the Hook message in Cucumberโs message protocol.
Attributes
Public Class Methods
Source
# File lib/cucumber/messages/hook.rb, line 43 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
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/hook.rb, line 21 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
Calls superclass method