Module: Wat

Includes:
ActiveSupport::Configurable
Defined in:
lib/wat.rb,
lib/wat/engine.rb,
lib/wat/version.rb,
lib/wat/error_handler.rb

Defined Under Namespace

Modules: ErrorHandler Classes: Engine, InstallGenerator

Constant Summary collapse

VERSION =
"0.0.1"

Class Method Summary collapse

Class Method Details

.configure(&block) ⇒ Object



11
12
13
14
15
# File 'lib/wat.rb', line 11

def configure(&block)
  config.errors = YAML::load(File.new(Rails.root.join('config', 'errors.yml').to_s, 'r'))
  @lookup_table = lookup_table_from_errors(config.errors)
  super &block
end

.lookup(exception) ⇒ Object



17
18
19
# File 'lib/wat.rb', line 17

def lookup(exception)
  @table[exception]
end