Class: Rho::RhoApplication
Class Method Summary collapse
- .get_app_path(appname) ⇒ Object
- .get_base_app_path ⇒ Object
- .get_model_path(appname, modelname) ⇒ Object
Instance Method Summary collapse
-
#initialize ⇒ RhoApplication
constructor
A new instance of RhoApplication.
- #serve(req, res) ⇒ Object
Constructor Details
#initialize ⇒ RhoApplication
Returns a new instance of RhoApplication.
7 8 9 10 11 |
# File 'lib/rho/rhoapplication.rb', line 7 def initialize if @rhom.nil? @rhom = Rhom::Rhom.new end end |
Class Method Details
.get_app_path(appname) ⇒ Object
15 16 17 |
# File 'lib/rho/rhoapplication.rb', line 15 def get_app_path(appname) Rho::RhoFSConnector::get_app_path(appname) end |
.get_base_app_path ⇒ Object
19 20 21 |
# File 'lib/rho/rhoapplication.rb', line 19 def get_base_app_path Rho::RhoFSConnector::get_base_app_path end |
.get_model_path(appname, modelname) ⇒ Object
23 24 25 |
# File 'lib/rho/rhoapplication.rb', line 23 def get_model_path(appname, modelname) Rho::RhoFSConnector::get_model_path(appname, modelname) end |
Instance Method Details
#serve(req, res) ⇒ Object
29 30 31 32 33 |
# File 'lib/rho/rhoapplication.rb', line 29 def serve(req,res) req[:modelpath] = self.class.get_model_path req['application'], req['model'] require req[:modelpath]+'controller' res['request-body'] = (Object.const_get(req['model']+'Controller').new).send :serve, @rhom, req, res end |