class Cucumber::Messages::Attachment

def self.from_h(hash)

#
Cucumber::Messages::Attachment.from_h(some_hash) # => #

corresponding snake_cased attributes.
If the hash keys are camelCased, they are properly assigned to the
Returns a new Attachment from the given hash.
#
def self.from_h(hash)
  return nil if hash.nil?
  new(
    body: hash[:body],
    content_encoding: hash[:contentEncoding],
    file_name: hash[:fileName],
    media_type: hash[:mediaType],
    source: Source.from_h(hash[:source]),
    test_case_started_id: hash[:testCaseStartedId],
    test_step_id: hash[:testStepId],
    url: hash[:url],
    test_run_started_id: hash[:testRunStartedId]
  )
end