class MiscFile

Attributes

size[R]
type[R]
url[R]

Public Class Methods

find(k, v) click to toggle source
# File lib/zarchitect/misc_file.rb, line 12
def self.find(k, v)
  ObjectSpace.each_object(MiscFile) do |a|
    str = a.send(k)
    return a if str == v
  end
end
new(path) click to toggle source
# File lib/zarchitect/misc_file.rb, line 4
def initialize(path)
  @path = path
  @url = path.clone
  @url[0] = "/"
  @size = File.size(path)
  @type = File.extname(path)[1..-1]
end