Class: PennyWise::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



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

def initialize
  @require_integration = true
  @errors = {}
  @error_messages = {}
  @unknown_error_message = ['Unexpected Error', 'It looks like something went wrong.']
  @error_layout = 'application'
  @error_template = '/errors/error'
  @failure_message =  "While handling an error, our error handler encountered an error;" \
                      " which is why we built this second one." \
                      "\nThis issue has been registered as critical." \
                      "\nYou can imagine fixing it is now our top priority," \
                      " thank you for discovering it!"
  @logger = Logger.new(STDERR)
end

Instance Attribute Details

#error_layoutObject

Returns the value of attribute error_layout.



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

def error_layout
  @error_layout
end

#error_messagesObject

Returns the value of attribute error_messages.



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

def error_messages
  @error_messages
end

#error_templateObject

Returns the value of attribute error_template.



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

def error_template
  @error_template
end

#errorsObject

Returns the value of attribute errors.



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

def errors
  @errors
end

#failure_messageObject

Returns the value of attribute failure_message.



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

def failure_message
  @failure_message
end

#loggerObject

Returns the value of attribute logger.



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

def logger
  @logger
end

#require_integrationObject

Returns the value of attribute require_integration.



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

def require_integration
  @require_integration
end

#unknown_error_messageObject

Returns the value of attribute unknown_error_message.



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

def unknown_error_message
  @unknown_error_message
end