Class: FileMarshal::Loader
- Inherits:
-
Object
- Object
- FileMarshal::Loader
- Defined in:
- lib/file_marshal/loader.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
Instance Method Summary collapse
-
#initialize(opts) ⇒ Loader
constructor
A new instance of Loader.
- #tempfile ⇒ Object
- #to_file(path) ⇒ Object
Constructor Details
#initialize(opts) ⇒ Loader
Returns a new instance of Loader.
5 6 7 8 9 10 |
# File 'lib/file_marshal/loader.rb', line 5 def initialize(opts) opts.symbolize_keys! @attributes = FileAttributes.new( opts[:name], opts[:content], opts[:updated_at] ) end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
3 4 5 |
# File 'lib/file_marshal/loader.rb', line 3 def attributes @attributes end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
3 4 5 |
# File 'lib/file_marshal/loader.rb', line 3 def file @file end |