Class: YAKC::Configuration
- Inherits:
-
Object
- Object
- YAKC::Configuration
- Defined in:
- lib/yakc/configuration.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
-
#brokers ⇒ Object
Returns the value of attribute brokers.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#suffix ⇒ Object
Returns the value of attribute suffix.
-
#topics ⇒ Object
Returns the value of attribute topics.
-
#zookeepers ⇒ Object
Returns the value of attribute zookeepers.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 8 9 10 11 12 |
# File 'lib/yakc/configuration.rb', line 5 def initialize logger = Logger.new(STDOUT) brokers = ENV.fetch("BROKERS", "localhost:9092").split(",") zookeepers = ENV.fetch("ZOOKEEPERS", "localhost:2181").split(",") app = ENV["APP"] suffix = ENV["SUFFIX"] topics = ENV["TOPICS"] end |
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app.
3 4 5 |
# File 'lib/yakc/configuration.rb', line 3 def app @app end |
#brokers ⇒ Object
Returns the value of attribute brokers.
3 4 5 |
# File 'lib/yakc/configuration.rb', line 3 def brokers @brokers end |
#logger ⇒ Object
Returns the value of attribute logger.
3 4 5 |
# File 'lib/yakc/configuration.rb', line 3 def logger @logger end |
#suffix ⇒ Object
Returns the value of attribute suffix.
3 4 5 |
# File 'lib/yakc/configuration.rb', line 3 def suffix @suffix end |
#topics ⇒ Object
Returns the value of attribute topics.
3 4 5 |
# File 'lib/yakc/configuration.rb', line 3 def topics @topics end |
#zookeepers ⇒ Object
Returns the value of attribute zookeepers.
3 4 5 |
# File 'lib/yakc/configuration.rb', line 3 def zookeepers @zookeepers end |