Class: Allure::Attachment

Inherits:
JSONable show all
Defined in:
allure-ruby-commons/lib/allure_ruby_commons/model/attachment.rb

Overview

Allure model attachment object

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from JSONable

#==, #to_hash, #to_json

Constructor Details

#initialize(name:, type:, source:) ⇒ Attachment

Returns a new instance of Attachment.

Parameters:

  • name (String)

    attachment name

  • type (String)

    attachment type, ContentType

  • source (String)

    attachment file name



9
10
11
12
13
14
15
# File 'allure-ruby-commons/lib/allure_ruby_commons/model/attachment.rb', line 9

def initialize(name:, type:, source:)
  super()

  @name = name
  @type = type
  @source = source
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



17
18
19
# File 'allure-ruby-commons/lib/allure_ruby_commons/model/attachment.rb', line 17

def name
  @name
end

#sourceObject

Returns the value of attribute source.



17
18
19
# File 'allure-ruby-commons/lib/allure_ruby_commons/model/attachment.rb', line 17

def source
  @source
end

#typeObject

Returns the value of attribute type.



17
18
19
# File 'allure-ruby-commons/lib/allure_ruby_commons/model/attachment.rb', line 17

def type
  @type
end