# File lib/cgikit/template_store.rb, line 125
  def load_declarations( component, source )
    store = nil
    if hash = component.will_parse_declarations then
      DeclarationStore.merge_source(source, hash)
      store = DeclarationStore.new_from_hash(hash)
    elsif path = component.declaration_file then
      begin
        store = DeclarationStore.new_with_file(path, source)
      rescue Exception => e
        raise "can't load declaration file (#{path}): #{e.message}"
      end
    else
      store = DeclarationStore.new_from_hash(source)
    end
    store
  end