Class: JRuby::Rack::RailsGrizzlyHelper

Inherits:
GrizzlyHelper show all
Defined in:
lib/jruby/rack/rails.rb

Instance Attribute Summary collapse

Attributes inherited from GrizzlyHelper

#gem_path, #public_root

Instance Method Summary collapse

Methods inherited from GrizzlyHelper

instance, #logdev, #logger, #setup_gems

Constructor Details

#initialize(glassfish_config = nil) ⇒ RailsGrizzlyHelper

Returns a new instance of RailsGrizzlyHelper.



9
10
11
12
13
14
# File 'lib/jruby/rack/rails.rb', line 9

def initialize(glassfish_config = nil)
  super
  @rails_root = @glassfish_config.app_root
  @rails_env = @glassfish_config.environment
  @context_root = @glassfish_config.context_root 
end

Instance Attribute Details

#context_rootObject

Returns the value of attribute context_root.



7
8
9
# File 'lib/jruby/rack/rails.rb', line 7

def context_root
  @context_root
end

#rails_envObject

Returns the value of attribute rails_env.



7
8
9
# File 'lib/jruby/rack/rails.rb', line 7

def rails_env
  @rails_env
end

#rails_rootObject

Returns the value of attribute rails_root.



7
8
9
# File 'lib/jruby/rack/rails.rb', line 7

def rails_root
  @rails_root
end

Instance Method Details

#optionsObject



16
17
18
# File 'lib/jruby/rack/rails.rb', line 16

def options
  {:public => public_root, :root => rails_root, :environment => rails_env, :prefix=>context_root}
end