Class: SinatraHelpers::SinatraApp
- Inherits:
-
Object
- Object
- SinatraHelpers::SinatraApp
- Defined in:
- lib/webapp_raketasks/sinatra_helpers/sinatra_app.rb
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
- #create_config_ru ⇒ Object
- #create_index_haml(content = index_haml) ⇒ Object
- #create_layout_haml(content = layout_haml) ⇒ Object
- #create_webapp_rb ⇒ Object
Class Method Details
.invoke ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/webapp_raketasks/sinatra_helpers/sinatra_app.rb', line 4 def self.invoke app = new app.create_webapp_rb app.create_config_ru app.create_index_haml app.create_layout_haml end |
Instance Method Details
#create_config_ru ⇒ Object
14 15 16 |
# File 'lib/webapp_raketasks/sinatra_helpers/sinatra_app.rb', line 14 def create_config_ru create_file_with_content( "./config.ru", config_ru ) end |
#create_index_haml(content = index_haml) ⇒ Object
17 18 19 |
# File 'lib/webapp_raketasks/sinatra_helpers/sinatra_app.rb', line 17 def create_index_haml content = index_haml create_file_with_content( "./views/index.haml", content ) end |
#create_layout_haml(content = layout_haml) ⇒ Object
20 21 22 |
# File 'lib/webapp_raketasks/sinatra_helpers/sinatra_app.rb', line 20 def create_layout_haml content = layout_haml create_file_with_content( "./views/layout.haml", content ) end |
#create_webapp_rb ⇒ Object
11 12 13 |
# File 'lib/webapp_raketasks/sinatra_helpers/sinatra_app.rb', line 11 def create_webapp_rb create_file_with_content("./webapp.rb", webapp_rb) end |