class FileMarshal::Dumper
Attributes
file[R]
Public Class Methods
new(file)
click to toggle source
# File lib/file_marshal/dumper.rb, line 5 def initialize(file) @file = file end
Public Instance Methods
content()
click to toggle source
# File lib/file_marshal/dumper.rb, line 17 def content file.rewind file.read end
to_hash()
click to toggle source
# File lib/file_marshal/dumper.rb, line 9 def to_hash { updated_at: file.mtime, name: File.basename(file.path), content: content } end