Class: Zaikio::Loom::Configuration
- Inherits:
-
Object
- Object
- Zaikio::Loom::Configuration
- Defined in:
- lib/zaikio/loom/configuration.rb
Constant Summary collapse
- HOSTS =
{ test: "http://loom.zaikio.test", staging: "https://loom.staging.zaikio.com", sandbox: "https://loom.sandbox.zaikio.com", production: "https://loom.zaikio.com" }.freeze
Instance Attribute Summary collapse
-
#apps ⇒ Object
readonly
Returns the value of attribute apps.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
- #logger ⇒ Object
-
#queue ⇒ Object
Returns the value of attribute queue.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
- #application(name) {|| ... } ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
17 18 19 20 |
# File 'lib/zaikio/loom/configuration.rb', line 17 def initialize @environment = :sandbox @apps = {} end |
Instance Attribute Details
#apps ⇒ Object (readonly)
Returns the value of attribute apps.
14 15 16 |
# File 'lib/zaikio/loom/configuration.rb', line 14 def apps @apps end |
#environment ⇒ Object
Returns the value of attribute environment.
14 15 16 |
# File 'lib/zaikio/loom/configuration.rb', line 14 def environment @environment end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
14 15 16 |
# File 'lib/zaikio/loom/configuration.rb', line 14 def host @host end |
#logger ⇒ Object
22 23 24 |
# File 'lib/zaikio/loom/configuration.rb', line 22 def logger @logger ||= Logger.new($stdout) end |
#queue ⇒ Object
Returns the value of attribute queue.
14 15 16 |
# File 'lib/zaikio/loom/configuration.rb', line 14 def queue @queue end |
#version ⇒ Object
Returns the value of attribute version.
13 14 15 |
# File 'lib/zaikio/loom/configuration.rb', line 13 def version @version end |
Instance Method Details
#application(name) {|| ... } ⇒ Object
35 36 37 38 |
# File 'lib/zaikio/loom/configuration.rb', line 35 def application(name) @apps[name.to_s] = AppConfiguration.new(name.to_s) yield(@apps[name.to_s]) end |