class Cucumber::Messages::DocString
Represents the DocString
message in Cucumber’s message protocol.
Attributes
content[R]
delimiter[R]
location[R]
media_type[R]
Public Class Methods
from_h(hash)
click to toggle source
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... ...>
# 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
new( location: Location.new, media_type: nil, content: '', delimiter: '' )
click to toggle source
Calls superclass method
# 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