Class: JettyRails::Adapters::AbstractAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/jetty_rails/adapters/abstract_adapter.rb

Direct Known Subclasses

MerbAdapter, RailsAdapter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ AbstractAdapter

Returns a new instance of AbstractAdapter.



6
7
8
# File 'lib/jetty_rails/adapters/abstract_adapter.rb', line 6

def initialize(config)
  @config = config
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



4
5
6
# File 'lib/jetty_rails/adapters/abstract_adapter.rb', line 4

def config
  @config
end

Instance Method Details

#base_init_paramsObject



10
11
12
13
14
15
16
17
18
# File 'lib/jetty_rails/adapters/abstract_adapter.rb', line 10

def base_init_params()
  @base_init_params ||= { 
    'public.root' => '/public',
    'gem.path' => config[:gem_path] || ENV['GEM_PATH'] || 'tmp/war/WEB-INF/gems',
    'jruby.initial.runtimes' => "#{config[:jruby_min_runtimes]}",
    'jruby.min.runtimes' => "#{config[:jruby_min_runtimes]}",
    'jruby.max.runtimes' => "#{config[:jruby_max_runtimes]}"
  }
end

#event_listenersObject



20
21
22
# File 'lib/jetty_rails/adapters/abstract_adapter.rb', line 20

def event_listeners
  []
end