Class: BigSister::Configuration

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

Constant Summary collapse

MONITOR_TYPES =
%w(local springcm).freeze
REPORTER_TYPES =
%w(csv zoho-analytics).freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Configuration

Returns a new instance of Configuration.



13
14
15
16
17
18
19
20
# File 'lib/bigsister/configuration.rb', line 13

def initialize(data)
  @monitors = []
  @reporters = []
  @config_errors = []

  load_monitoring(data)
  load_reporting(data)
end

Instance Attribute Details

#monitorsObject (readonly)

Returns the value of attribute monitors.



11
12
13
# File 'lib/bigsister/configuration.rb', line 11

def monitors
  @monitors
end

#reportersObject (readonly)

Returns the value of attribute reporters.



11
12
13
# File 'lib/bigsister/configuration.rb', line 11

def reporters
  @reporters
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


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

def valid?
  @config_errors.empty?
end