Class: JRuby::Rack::GrizzlyHelper
- Inherits:
-
Object
- Object
- JRuby::Rack::GrizzlyHelper
- Defined in:
- lib/jruby/rack/grizzly_helper.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#gem_path ⇒ Object
readonly
Returns the value of attribute gem_path.
-
#public_root ⇒ Object
readonly
Returns the value of attribute public_root.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(glassfish_config = nil) ⇒ GrizzlyHelper
constructor
A new instance of GrizzlyHelper.
- #logdev ⇒ Object
- #logger ⇒ Object
- #setup_gems ⇒ Object
Constructor Details
#initialize(glassfish_config = nil) ⇒ GrizzlyHelper
Returns a new instance of GrizzlyHelper.
150 151 152 153 154 155 |
# File 'lib/jruby/rack/grizzly_helper.rb', line 150 def initialize(glassfish_config = nil) @glassfish_config = glassfish_config || $glassfish_config @public_root = File.join(@glassfish_config.app_root, "public") @gem_path = @glassfish_config.gem_path setup_gems end |
Instance Attribute Details
#gem_path ⇒ Object (readonly)
Returns the value of attribute gem_path.
148 149 150 |
# File 'lib/jruby/rack/grizzly_helper.rb', line 148 def gem_path @gem_path end |
#public_root ⇒ Object (readonly)
Returns the value of attribute public_root.
148 149 150 |
# File 'lib/jruby/rack/grizzly_helper.rb', line 148 def public_root @public_root end |
Class Method Details
.instance ⇒ Object
169 170 171 |
# File 'lib/jruby/rack/grizzly_helper.rb', line 169 def self.instance @instance ||= self.new end |
Instance Method Details
#logdev ⇒ Object
157 158 159 |
# File 'lib/jruby/rack/grizzly_helper.rb', line 157 def logdev @logdev ||= GrizzlyLog.new end |
#logger ⇒ Object
161 162 163 |
# File 'lib/jruby/rack/grizzly_helper.rb', line 161 def logger @logger ||= begin; require 'logger'; Logger.new(logdev); end end |
#setup_gems ⇒ Object
165 166 167 |
# File 'lib/jruby/rack/grizzly_helper.rb', line 165 def setup_gems ENV['GEM_PATH'] = @gem_path end |