class Cucumber::Messages::DocString
Represents the DocString message in Cucumberโs message protocol.
Attributes
Public Class Methods
Source
# File lib/cucumber/messages/doc_string.rb, line 39 def self.from_h(hash) return nil if hash.nil? new( location: Location.from_h(hash[:location]), media_type: hash[:mediaType], content: hash[:content], delimiter: hash[:delimiter] ) end
Returns a new DocString from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.
Cucumber::Messages::DocString.from_h(some_hash) # => #<Cucumber::Messages::DocString:0x... ...>
Source
# File lib/cucumber/messages/doc_string.rb, line 19 def initialize( location: Location.new, media_type: nil, content: '', delimiter: '' ) @location = location @media_type = media_type @content = content @delimiter = delimiter super() end
Calls superclass method