Class: Trinidad::Configuration
- Inherits:
-
Object
- Object
- Trinidad::Configuration
- Defined in:
- lib/trinidad/configuration.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#ajp ⇒ Object
Returns the value of attribute ajp.
-
#apps_base ⇒ Object
Returns the value of attribute apps_base.
-
#classes_dir ⇒ Object
Returns the value of attribute classes_dir.
-
#context_path ⇒ Object
Returns the value of attribute context_path.
-
#default_web_xml ⇒ Object
Returns the value of attribute default_web_xml.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#extensions ⇒ Object
Returns the value of attribute extensions.
-
#hosts ⇒ Object
Returns the value of attribute hosts.
-
#http ⇒ Object
Returns the value of attribute http.
-
#jruby_max_runtimes ⇒ Object
Returns the value of attribute jruby_max_runtimes.
-
#jruby_min_runtimes ⇒ Object
Returns the value of attribute jruby_min_runtimes.
-
#libs_dir ⇒ Object
Returns the value of attribute libs_dir.
-
#log ⇒ Object
Returns the value of attribute log.
-
#monitor ⇒ Object
Returns the value of attribute monitor.
-
#port ⇒ Object
Returns the value of attribute port.
-
#public ⇒ Object
Returns the value of attribute public.
-
#rackup ⇒ Object
Returns the value of attribute rackup.
-
#servlet ⇒ Object
Returns the value of attribute servlet.
-
#ssl ⇒ Object
Returns the value of attribute ssl.
-
#trap ⇒ Object
Returns the value of attribute trap.
-
#web_app_dir ⇒ Object
Returns the value of attribute web_app_dir.
-
#web_apps ⇒ Object
Returns the value of attribute web_apps.
Instance Method Summary collapse
- #[](name) ⇒ Object
- #[]=(name, value) ⇒ Object
- #has_key?(name) ⇒ Boolean (also: #key?)
-
#initialize(options = {}) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(options = {}) ⇒ Configuration
Returns a new instance of Configuration.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/trinidad/configuration.rb', line 23 def initialize( = {}) @environment = 'development' @context_path = '/' @libs_dir = 'lib' @classes_dir = 'classes' @default_web_xml = 'config/web.xml' @port = 3000 @jruby_min_runtimes = 1 @jruby_max_runtimes = 5 @address = 'localhost' @log = 'INFO' @trap = true .symbolize!.each {|k, v| self[k] = v} end |
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
18 19 20 |
# File 'lib/trinidad/configuration.rb', line 18 def address @address end |
#ajp ⇒ Object
Returns the value of attribute ajp.
18 19 20 |
# File 'lib/trinidad/configuration.rb', line 18 def ajp @ajp end |
#apps_base ⇒ Object
Returns the value of attribute apps_base.
18 19 20 |
# File 'lib/trinidad/configuration.rb', line 18 def apps_base @apps_base end |
#classes_dir ⇒ Object
Returns the value of attribute classes_dir.
18 19 20 |
# File 'lib/trinidad/configuration.rb', line 18 def classes_dir @classes_dir end |
#context_path ⇒ Object
Returns the value of attribute context_path.
18 19 20 |
# File 'lib/trinidad/configuration.rb', line 18 def context_path @context_path end |
#default_web_xml ⇒ Object
Returns the value of attribute default_web_xml.
18 19 20 |
# File 'lib/trinidad/configuration.rb', line 18 def default_web_xml @default_web_xml end |
#environment ⇒ Object
Returns the value of attribute environment.
18 19 20 |
# File 'lib/trinidad/configuration.rb', line 18 def environment @environment end |
#extensions ⇒ Object
Returns the value of attribute extensions.
18 19 20 |
# File 'lib/trinidad/configuration.rb', line 18 def extensions @extensions end |
#hosts ⇒ Object
Returns the value of attribute hosts.
18 19 20 |
# File 'lib/trinidad/configuration.rb', line 18 def hosts @hosts end |
#http ⇒ Object
Returns the value of attribute http.
18 19 20 |
# File 'lib/trinidad/configuration.rb', line 18 def http @http end |
#jruby_max_runtimes ⇒ Object
Returns the value of attribute jruby_max_runtimes.
18 19 20 |
# File 'lib/trinidad/configuration.rb', line 18 def jruby_max_runtimes @jruby_max_runtimes end |
#jruby_min_runtimes ⇒ Object
Returns the value of attribute jruby_min_runtimes.
18 19 20 |
# File 'lib/trinidad/configuration.rb', line 18 def jruby_min_runtimes @jruby_min_runtimes end |
#libs_dir ⇒ Object
Returns the value of attribute libs_dir.
18 19 20 |
# File 'lib/trinidad/configuration.rb', line 18 def libs_dir @libs_dir end |
#log ⇒ Object
Returns the value of attribute log.
18 19 20 |
# File 'lib/trinidad/configuration.rb', line 18 def log @log end |
#monitor ⇒ Object
Returns the value of attribute monitor.
18 19 20 |
# File 'lib/trinidad/configuration.rb', line 18 def monitor @monitor end |
#port ⇒ Object
Returns the value of attribute port.
18 19 20 |
# File 'lib/trinidad/configuration.rb', line 18 def port @port end |
#public ⇒ Object
Returns the value of attribute public.
18 19 20 |
# File 'lib/trinidad/configuration.rb', line 18 def public @public end |
#rackup ⇒ Object
Returns the value of attribute rackup.
18 19 20 |
# File 'lib/trinidad/configuration.rb', line 18 def rackup @rackup end |
#servlet ⇒ Object
Returns the value of attribute servlet.
18 19 20 |
# File 'lib/trinidad/configuration.rb', line 18 def servlet @servlet end |
#ssl ⇒ Object
Returns the value of attribute ssl.
18 19 20 |
# File 'lib/trinidad/configuration.rb', line 18 def ssl @ssl end |
#trap ⇒ Object
Returns the value of attribute trap.
18 19 20 |
# File 'lib/trinidad/configuration.rb', line 18 def trap @trap end |
#web_app_dir ⇒ Object
Returns the value of attribute web_app_dir.
18 19 20 |
# File 'lib/trinidad/configuration.rb', line 18 def web_app_dir @web_app_dir end |
#web_apps ⇒ Object
Returns the value of attribute web_apps.
18 19 20 |
# File 'lib/trinidad/configuration.rb', line 18 def web_apps @web_apps end |
Instance Method Details
#[](name) ⇒ Object
39 40 41 |
# File 'lib/trinidad/configuration.rb', line 39 def [](name) respond_to?(name) ? send(name) : nil end |
#[]=(name, value) ⇒ Object
43 44 45 |
# File 'lib/trinidad/configuration.rb', line 43 def []=(name, value) send :"#{name}=", value if respond_to?(:"#{name}=") end |
#has_key?(name) ⇒ Boolean Also known as: key?
47 48 49 |
# File 'lib/trinidad/configuration.rb', line 47 def has_key?(name) instance_variable_defined?(name) rescue false end |