Class: ChunkyBaconfile::FileInfo

Inherits:
Hashie::Mash
  • Object
show all
Defined in:
lib/chunky_baconfile/file_info.rb

Instance Method Summary collapse

Instance Method Details

#image?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/chunky_baconfile/file_info.rb', line 15

def image?
  self.type == 'image'
end

#sizeObject



3
4
5
# File 'lib/chunky_baconfile/file_info.rb', line 3

def size
  self[:size]
end

#time_modifiedObject



7
8
9
# File 'lib/chunky_baconfile/file_info.rb', line 7

def time_modified
  Time.at(self[:time_modified])
end

#typeObject



11
12
13
# File 'lib/chunky_baconfile/file_info.rb', line 11

def type
  self[:type]
end