class Cucumber::Messages::Comment
Represents the Comment message in Cucumber's message protocol.
*
A comment in a Gherkin document
Attributes
location[R]
The location of the comment
text[R]
The text of the comment
Public Class Methods
from_h(hash)
click to toggle source
Returns a new Comment from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.
Cucumber::Messages::Comment.from_h(some_hash) # => #<Cucumber::Messages::Comment:0x... ...>
# File lib/cucumber/messages.deserializers.rb, line 166 def self.from_h(hash) return nil if hash.nil? self.new( location: Location.from_h(hash[:location]), text: hash[:text], ) end
new( location: Location.new, text: '' )
click to toggle source
# File lib/cucumber/messages.dtos.rb, line 354 def initialize( location: Location.new, text: '' ) @location = location @text = text end