class Cucumber::Messages::Attachment

#
is captured in ‘TestResult`.
It is not to be used for runtime errors raised/thrown during execution. This
* Logs captured and attached during execution
* Screenshots captured and attached during execution
* Syntax errors during parse time<br><br>(#io.cucumber.messages.Source) file. It can be used for:
An attachment represents any kind of data associated with a line in a
*
//// Attachments (parse errors, execution errors, screenshots, links…)
#
Represents the Attachment message in Cucumber’s message protocol.
#

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

def initialize(

def initialize(
  body: '',
  content_encoding: AttachmentContentEncoding::IDENTITY,
  file_name: nil,
  media_type: '',
  source: nil,
  test_case_started_id: nil,
  test_step_id: nil,
  url: nil,
  test_run_started_id: nil
)
  @body = body
  @content_encoding = content_encoding
  @file_name = file_name
  @media_type = media_type
  @source = source
  @test_case_started_id = test_case_started_id
  @test_step_id = test_step_id
  @url = url
  @test_run_started_id = test_run_started_id
  super()
end