Class: Teamster::Core::App
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- Teamster::Core::App
- Defined in:
- lib/teamster.rb
Constant Summary collapse
- CORE_CONFIG =
'./conf/teamster.conf'- @@adapters =
[]
- @@views =
[]
- @@title =
'TEAMSTER'- @@root =
Dir.pwd
Class Method Summary collapse
- .adapters ⇒ Object
- .current_working_folder ⇒ Object
-
.set_default_options_from(core_opts) ⇒ Object
NOTE: Class methods used in configure block needs be declared before the configure block.
- .title ⇒ Object
- .use_adapter(teamster_adapter) ⇒ Object
- .views ⇒ Object
Class Method Details
.adapters ⇒ Object
41 42 43 |
# File 'lib/teamster.rb', line 41 def self.adapters @@adapters end |
.current_working_folder ⇒ Object
53 54 55 |
# File 'lib/teamster.rb', line 53 def self.current_working_folder @@root end |
.set_default_options_from(core_opts) ⇒ Object
NOTE: Class methods used in configure block needs be declared
before the configure block.
20 21 22 |
# File 'lib/teamster.rb', line 20 def self.(core_opts) @@title = core_opts[:title] end |
.title ⇒ Object
49 50 51 |
# File 'lib/teamster.rb', line 49 def self.title @@title end |
.use_adapter(teamster_adapter) ⇒ Object
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/teamster.rb', line 57 def self.use_adapter(teamster_adapter) if @@adapters.include? teamster_adapter puts "Adapter #{teamster_adapter} already registered!" else @@adapters << teamster_adapter @@views << teamster_adapter.views end teamster_adapter.helpers GeneralHelper if teamster_adapter.has_helper? teamster_adapter.helper_adapter.flatten.each do |mod| helpers mod end end use teamster_adapter end |
.views ⇒ Object
45 46 47 |
# File 'lib/teamster.rb', line 45 def self.views @@views end |