Class: ApiCanon::DocumentationStore
- Inherits:
-
Object
- Object
- ApiCanon::DocumentationStore
- Includes:
- Singleton
- Defined in:
- lib/api_canon/documentation_store.rb
Overview
Replace this at the earliest possible opportunity with something that stores stuff in Redis or something
Defined Under Namespace
Classes: Docos
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.docos ⇒ Object
16 17 18 |
# File 'lib/api_canon/documentation_store.rb', line 16 def self.docos self.instance.docos end |
.fetch(controller_path) ⇒ Object
22 23 24 |
# File 'lib/api_canon/documentation_store.rb', line 22 def self.fetch controller_path self.instance.docos[controller_path] end |
.store(cont_doco) ⇒ Object
19 20 21 |
# File 'lib/api_canon/documentation_store.rb', line 19 def self.store cont_doco self.instance.store cont_doco end |
Instance Method Details
#docos ⇒ Object
12 13 14 15 |
# 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) ⇒ Object
8 9 10 11 |
# File 'lib/api_canon/documentation_store.rb', line 8 def store cont_doco @docos ||= Docos.new @docos[cont_doco.controller_path] = cont_doco end |