root/lib/mycyma.rb @ fc30c2a2
b689e231 | Marc Dequènes (Duck) | ||
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
|