Class: HitorigotoReporter::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/hitorigoto_reporter/config.rb

Defined Under Namespace

Classes: Builder

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



23
24
25
26
27
# File 'lib/hitorigoto_reporter/config.rb', line 23

def initialize
  @logger = Logger.new(STDOUT)
  @slack_target_channels_delimiter = ";"
  @esa_user = "esa_bot"
end

Instance Attribute Details

#esa_access_tokenObject

Returns the value of attribute esa_access_token.



11
12
13
# File 'lib/hitorigoto_reporter/config.rb', line 11

def esa_access_token
  @esa_access_token
end

#esa_current_teamObject

Returns the value of attribute esa_current_team.



11
12
13
# File 'lib/hitorigoto_reporter/config.rb', line 11

def esa_current_team
  @esa_current_team
end

#esa_report_categoryObject

Returns the value of attribute esa_report_category.



11
12
13
# File 'lib/hitorigoto_reporter/config.rb', line 11

def esa_report_category
  @esa_report_category
end

#esa_userObject

Returns the value of attribute esa_user.



11
12
13
# File 'lib/hitorigoto_reporter/config.rb', line 11

def esa_user
  @esa_user
end

#loggerObject

Returns the value of attribute logger.



11
12
13
# File 'lib/hitorigoto_reporter/config.rb', line 11

def logger
  @logger
end

#slack_access_tokenObject

Returns the value of attribute slack_access_token.



11
12
13
# File 'lib/hitorigoto_reporter/config.rb', line 11

def slack_access_token
  @slack_access_token
end

#slack_target_channelsObject

Returns the value of attribute slack_target_channels.



11
12
13
# File 'lib/hitorigoto_reporter/config.rb', line 11

def slack_target_channels
  @slack_target_channels
end

#slack_target_channels_delimiterObject

Returns the value of attribute slack_target_channels_delimiter.



11
12
13
# File 'lib/hitorigoto_reporter/config.rb', line 11

def slack_target_channels_delimiter
  @slack_target_channels_delimiter
end

Class Method Details

.configurationObject



19
20
21
# File 'lib/hitorigoto_reporter/config.rb', line 19

def self.configuration
  @config ||= configure {}
end

.configure(&block) ⇒ Object



15
16
17
# File 'lib/hitorigoto_reporter/config.rb', line 15

def self.configure(&block)
  @config = Config::Builder.new(&block).build
end