Class: Hokuto::Application
- Inherits:
-
Object
- Object
- Hokuto::Application
- Defined in:
- lib/hokuto/application.rb
Instance Attribute Summary collapse
-
#base_directory ⇒ Object
readonly
Returns the value of attribute base_directory.
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#context_root ⇒ Object
readonly
Returns the value of attribute context_root.
-
#descriptor ⇒ Object
readonly
Returns the value of attribute descriptor.
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
-
#max_instances ⇒ Object
readonly
Returns the value of attribute max_instances.
-
#min_instances ⇒ Object
readonly
Returns the value of attribute min_instances.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(args) ⇒ Application
constructor
A new instance of Application.
Constructor Details
#initialize(args) ⇒ Application
Returns a new instance of Application.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/hokuto/application.rb', line 17 def initialize(args) @context = WebAppContext.new if args[:descriptor] context.descriptor = args[:descriptor] else @environment = args[:environment] @context_root = args[:context_root] @base_directory = args[:base_directory] @min_instances = args[:min_instances] @max_instances = args[:max_instances] setup_context end end |
Instance Attribute Details
#base_directory ⇒ Object (readonly)
Returns the value of attribute base_directory.
14 15 16 |
# File 'lib/hokuto/application.rb', line 14 def base_directory @base_directory end |
#context ⇒ Object (readonly)
Returns the value of attribute context.
14 15 16 |
# File 'lib/hokuto/application.rb', line 14 def context @context end |
#context_root ⇒ Object (readonly)
Returns the value of attribute context_root.
14 15 16 |
# File 'lib/hokuto/application.rb', line 14 def context_root @context_root end |
#descriptor ⇒ Object (readonly)
Returns the value of attribute descriptor.
14 15 16 |
# File 'lib/hokuto/application.rb', line 14 def descriptor @descriptor end |
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
14 15 16 |
# File 'lib/hokuto/application.rb', line 14 def environment @environment end |
#max_instances ⇒ Object (readonly)
Returns the value of attribute max_instances.
14 15 16 |
# File 'lib/hokuto/application.rb', line 14 def max_instances @max_instances end |
#min_instances ⇒ Object (readonly)
Returns the value of attribute min_instances.
14 15 16 |
# File 'lib/hokuto/application.rb', line 14 def min_instances @min_instances end |
Instance Method Details
#==(other) ⇒ Object
34 35 36 37 |
# File 'lib/hokuto/application.rb', line 34 def ==(other) return false unless other.kind_of? Application other.context_root == context_root end |