class Cucumber::Messages::Source
#
A source file, typically a Gherkin document or Java/Ruby/JavaScript source code
*
//// Source
#
Represents the Source message in Cucumber’s message protocol.
#
def self.from_h(hash)
Cucumber::Messages::Source.from_h(some_hash) # => #
corresponding snake_cased attributes.
If the hash keys are camelCased, they are properly assigned to the
Returns a new Source from the given hash.
#
def self.from_h(hash) return nil if hash.nil? new( uri: hash[:uri], data: hash[:data], media_type: hash[:mediaType] ) end
def initialize(
def initialize( uri: '', data: '', media_type: SourceMediaType::TEXT_X_CUCUMBER_GHERKIN_PLAIN ) @uri = uri @data = data @media_type = media_type super() end