class Cucumber::Messages::Tag
Represents the Tag
message in Cucumber’s message protocol.
*
A tag
Attributes
location[R]
Location
of the tag
name[R]
The name of the tag (including the leading ‘@`)
Public Class Methods
from_h(hash)
click to toggle source
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... ...>
# File lib/cucumber/messages/tag.rb, line 47 def self.from_h(hash) return nil if hash.nil? new( location: Location.from_h(hash[:location]), name: hash[:name], id: hash[:id] ) end
new( location: Location.new, name: '', id: '' )
click to toggle source
Calls superclass method
# File lib/cucumber/messages/tag.rb, line 29 def initialize( location: Location.new, name: '', id: '' ) @location = location @name = name @id = id super() end