Class: Zaikio::Loom::Configuration

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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

#appsObject (readonly)

Returns the value of attribute apps.



14
15
16
# File 'lib/zaikio/loom/configuration.rb', line 14

def apps
  @apps
end

#environmentObject

Returns the value of attribute environment.



14
15
16
# File 'lib/zaikio/loom/configuration.rb', line 14

def environment
  @environment
end

#hostObject (readonly)

Returns the value of attribute host.



14
15
16
# File 'lib/zaikio/loom/configuration.rb', line 14

def host
  @host
end

#loggerObject



22
23
24
# File 'lib/zaikio/loom/configuration.rb', line 22

def logger
  @logger ||= Logger.new($stdout)
end

#queueObject

Returns the value of attribute queue.



14
15
16
# File 'lib/zaikio/loom/configuration.rb', line 14

def queue
  @queue
end

#versionObject

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

Yields:

  • ()


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