Class: Attach::File
- Inherits:
-
Object
- Object
- Attach::File
- Defined in:
- lib/attach/file.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(data, name = 'untitled', type = 'application/octet-stream') ⇒ File
constructor
A new instance of File.
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
#data ⇒ Object
Returns the value of attribute data.
6 7 8 |
# File 'lib/attach/file.rb', line 6 def data @data end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/attach/file.rb', line 6 def name @name end |
#type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/attach/file.rb', line 6 def type @type end |