Project

General

Profile

Download (483 Bytes) Statistics
| Branch: | Tag: | Revision:

require 'mycyma/info'

require 'ostruct'
require 'singleton'

module MyCyma

class Config < OpenStruct
include Singleton

def initialize
str = File.read(File.join(RAILS_ROOT, "config", "settings.yml"))
conf_doc = YAML.load(str)
super(conf_doc)
end

def thumbnail_param_list
list = {}
self.thumbnail_sizes.each_pair do |name, params|
key = ("thumb_" + name).to_sym
list[key] = params
end
list
end

end

end

(2-2/5)