Class: Attach::File

Inherits:
Object
  • Object
show all
Defined in:
lib/attach/file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, name = 'untitled', type = 'application/octet-stream') ⇒ File

Returns a new instance of File.



8
9
10
11
12
# File 'lib/attach/file.rb', line 8

def initialize(data, name = 'untitled', type = 'application/octet-stream')
  @data = data
  @name = name
  @type = type
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



6
7
8
# File 'lib/attach/file.rb', line 6

def data
  @data
end

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/attach/file.rb', line 6

def name
  @name
end

#typeObject

Returns the value of attribute type.



6
7
8
# File 'lib/attach/file.rb', line 6

def type
  @type
end