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/comment.rb, line 39 def self.from_h(hash) return nil if hash.nil? 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/comment.rb, line 23 def initialize( location: Location.new, text: '' ) @location = location @text = text super() end
Calls superclass method