class TinyMCE::Rails::ConfigurationFile

def changed?

def changed?
  @last_loaded != last_updated
end

def configuration

def configuration
  @configuration = load_configuration if reload?
  @configuration
end

def initialize(path)

def initialize(path)
  @path = path
end

def last_updated

def last_updated
  File.exist?(path) && File.mtime(path)
end

def load_configuration

def load_configuration
  @last_loaded = last_updated
  return Configuration.new_with_defaults if !File.exist?(path)
  options = load_yaml(path)
  if options && options.has_key?('default')
    MultipleConfiguration.new(options)
  else
    Configuration.new_with_defaults(options)
  end
end

def load_yaml(path)

def load_yaml(path)
  result = ERB.new(IO.read(path)).result
  YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(result) : YAML.load(result)
end

def reload?

def reload?
  @configuration.nil? || (reloadable? && changed?)
end

def reloadable?

def reloadable?
  !::Rails.application.config.cache_classes
end