Class: FileMarshal::Writer::File
- Inherits:
-
FileMarshal::Writer
- Object
- FileMarshal::Writer
- FileMarshal::Writer::File
- Defined in:
- lib/file_marshal/writer/file.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Attributes inherited from FileMarshal::Writer
Instance Method Summary collapse
- #file ⇒ Object
-
#initialize(attributes, path) ⇒ File
constructor
A new instance of File.
Methods inherited from FileMarshal::Writer
#build, #prepare, #set_time, #write
Constructor Details
#initialize(attributes, path) ⇒ File
Returns a new instance of File.
6 7 8 9 |
# File 'lib/file_marshal/writer/file.rb', line 6 def initialize(attributes, path) @attributes = attributes @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
4 5 6 |
# File 'lib/file_marshal/writer/file.rb', line 4 def path @path end |
Instance Method Details
#file ⇒ Object
11 12 13 |
# File 'lib/file_marshal/writer/file.rb', line 11 def file @file ||= ::File.new(path, "w+") end |