lib/socrates/configuration.rb in socrates-0.1.19 vs lib/socrates/configuration.rb in socrates-0.1.20

- old
+ new

@@ -15,16 +15,18 @@ attr_accessor :view_path attr_accessor :storage attr_accessor :error_message attr_accessor :expired_timeout # seconds attr_accessor :logger - attr_accessor :error_handler # a callable proc + attr_accessor :error_handler # a callable like ->(String, Exception) { ... } + attr_accessor :warn_handler # a callable like ->(String) { ... } def initialize @storage = Storage::Memory.new @error_message = "Sorry, something went wrong. We'll have to start over..." @expired_timeout = 30.minutes @logger = Socrates::Logger.default @error_handler = proc { |_message, _error| } + @warn_handler = proc { |_message| } end end end