Class: Contingency::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/contingency/configuration.rb', line 9

def initialize
  @errors = {}
  @error_messages = {}

  @error_layout = ''
  @error_template = ''

  @unknown_error_message = ['Server Error', 'It looks like something went wrong.']
  @failure_message =  "Server Error: It looks like something went wrong."

  @logger = Logger.new(STDERR)
end

Instance Attribute Details

#error_layoutObject

Returns the value of attribute error_layout.



4
5
6
# File 'lib/contingency/configuration.rb', line 4

def error_layout
  @error_layout
end

#error_messagesObject

Returns the value of attribute error_messages.



4
5
6
# File 'lib/contingency/configuration.rb', line 4

def error_messages
  @error_messages
end

#error_templateObject

Returns the value of attribute error_template.



4
5
6
# File 'lib/contingency/configuration.rb', line 4

def error_template
  @error_template
end

#errorsObject

Returns the value of attribute errors.



4
5
6
# File 'lib/contingency/configuration.rb', line 4

def errors
  @errors
end

#failure_messageObject

Returns the value of attribute failure_message.



4
5
6
# File 'lib/contingency/configuration.rb', line 4

def failure_message
  @failure_message
end

#loggerObject

Returns the value of attribute logger.



4
5
6
# File 'lib/contingency/configuration.rb', line 4

def logger
  @logger
end

#unknown_error_messageObject

Returns the value of attribute unknown_error_message.



4
5
6
# File 'lib/contingency/configuration.rb', line 4

def unknown_error_message
  @unknown_error_message
end