class Cucumber::Messages::Comment
Represents the Comment
message in Cucumber’s message protocol.
*
A comment in a Gherkin document
Attributes
The location of the comment
The text of the comment
Public Class Methods
Source
# File lib/cucumber/messages.deserializers.rb, line 146 def self.from_h(hash) return nil if hash.nil? self.new( location: Location.from_h(hash[:location]), text: hash[:text], ) end
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... ...>
Source
# File lib/cucumber/messages.dtos.rb, line 326 def initialize( location: Location.new, text: '' ) @location = location @text = text end