Class: YAKC::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/yakc/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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

#appObject

Returns the value of attribute app.



3
4
5
# File 'lib/yakc/configuration.rb', line 3

def app
  @app
end

#brokersObject

Returns the value of attribute brokers.



3
4
5
# File 'lib/yakc/configuration.rb', line 3

def brokers
  @brokers
end

#loggerObject

Returns the value of attribute logger.



3
4
5
# File 'lib/yakc/configuration.rb', line 3

def logger
  @logger
end

#suffixObject

Returns the value of attribute suffix.



3
4
5
# File 'lib/yakc/configuration.rb', line 3

def suffix
  @suffix
end

#topicsObject

Returns the value of attribute topics.



3
4
5
# File 'lib/yakc/configuration.rb', line 3

def topics
  @topics
end

#zookeepersObject

Returns the value of attribute zookeepers.



3
4
5
# File 'lib/yakc/configuration.rb', line 3

def zookeepers
  @zookeepers
end