Sha256: 01f71c110897133b34ef269cbdcd323ad7f28cc7111259c91a56adb6e06f671a

Contents?: true

Size: 374 Bytes

Versions: 1

Compression:

Stored size: 374 Bytes

Contents

class FileEntry
  attr_accessor :path, :name, :checksum, :size, :metadata

  def initialize(path, name)
    @path = path
    @name = name
  end

  def last_modified=(date)
    @last_modified = date.strftime("%FT%T%:z")
  end

  def last_modified
    DateTime.iso8601(@last_modified)
  end

  def to_s
    @path + @name + " (" + @size.to_s + ") - " + @last_modified
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
filentory-cli-0.2.0 lib/filentory/fileentry.rb