class ApiCanon::DocumentationStore
Replace this at the earliest possible opportunity with something that stores stuff in Redis or something
Public Class Methods
docos()
click to toggle source
# File lib/api_canon/documentation_store.rb, line 16 def self.docos self.instance.docos end
fetch(controller_path)
click to toggle source
# File lib/api_canon/documentation_store.rb, line 22 def self.fetch controller_path self.instance.docos[controller_path] end
store(cont_doco)
click to toggle source
# File lib/api_canon/documentation_store.rb, line 19 def self.store cont_doco self.instance.store cont_doco end
Public Instance Methods
docos()
click to toggle source
# File lib/api_canon/documentation_store.rb, line 12 def docos Dir.glob("#{Rails.root}/app/controllers/*.rb").each { |f| require_dependency f} @docos ||= {} end
store(cont_doco)
click to toggle source
# File lib/api_canon/documentation_store.rb, line 8 def store cont_doco @docos ||= Docos.new @docos[cont_doco.controller_path] = cont_doco end