class Cucumber::Messages::Tag
Represents the Tag message in Cucumberโs message protocol.
A tag
Attributes
Location of the tag
The name of the tag (including the leading โ@`)
Public Class Methods
Source
# File lib/cucumber/messages/tag.rb, line 46 def self.from_h(hash) return nil if hash.nil? new( location: Location.from_h(hash[:location]), name: hash[:name], id: hash[:id] ) end
Returns a new Tag from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.
Cucumber::Messages::Tag.from_h(some_hash) # => #<Cucumber::Messages::Tag:0x... ...>
Source
# File lib/cucumber/messages/tag.rb, line 28 def initialize( location: Location.new, name: '', id: '' ) @location = location @name = name @id = id super() end
Calls superclass method