Sha256: 344e1887604e9345d546844d63c7346d057a6e33c66e2b62c50915e1296756dc

Contents?: true

Size: 800 Bytes

Versions: 25

Compression:

Stored size: 800 Bytes

Contents

require 'rhom'
require 'rhofsconnector'

module Rho
  class RhoApplication
	
    def initialize
      if @rhom.nil?
        @rhom = Rhom::Rhom.new
      end
    end
	
    class << self
	
      def get_app_path(appname)
        Rho::RhoFSConnector::get_app_path(appname)
      end
      
      def get_base_app_path
        Rho::RhoFSConnector::get_base_app_path
      end

      def get_model_path(appname, modelname)
        Rho::RhoFSConnector::get_model_path(appname, modelname)
      end
	
    end

    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

  end # RhoApplication
end # Rho

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
rhodes-0.1.1 lib/rho/rhoapplication.rb
rhodes-0.2.0 lib/rho/rhoapplication.rb
rhodes-0.1.3 lib/rho/rhoapplication.rb
rhodes-0.2.1 lib/rho/rhoapplication.rb
rhodes-0.1.0 lib/rho/rhoapplication.rb
rhodes-0.1.2 lib/rho/rhoapplication.rb
rhodes-0.2.3 lib/rho/rhoapplication.rb
rhodes-0.2.4 lib/rho/rhoapplication.rb
rhodes-0.2.2 lib/rho/rhoapplication.rb
rhodes-0.2.5 lib/rho/rhoapplication.rb
rhodes-0.2.6 lib/rho/rhoapplication.rb
rhodes-0.3.0 lib/rho/rhoapplication.rb
rhodes-framework-1.0.1 lib/rho/rhoapplication.rb
rhodes-framework-1.0.0 lib/rho/rhoapplication.rb
rhodes-framework-1.0.10 lib/rho/rhoapplication.rb
rhodes-framework-1.0.2 lib/rho/rhoapplication.rb
rhodes-framework-1.0.4 lib/rho/rhoapplication.rb
rhodes-framework-1.0.5 lib/rho/rhoapplication.rb
rhodes-framework-1.0.3 lib/rho/rhoapplication.rb
rhodes-framework-1.0.7 lib/rho/rhoapplication.rb