class Cucumber::Messages::DocString
Attributes
Public Class Methods
Source
# File lib/cucumber/messages.deserializers.rb, line 186 def self.from_h(hash) return nil if hash.nil? self.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.dtos.rb, line 374 def initialize( location: Location.new, media_type: nil, content: '', delimiter: '' ) @location = location @media_type = media_type @content = content @delimiter = delimiter end