Class: Trax::Core::Errors::Arguments

Inherits:
Hashie::Dash
  • Object
show all
Defined in:
lib/trax/core/errors.rb

Overview

Example:

class AbstractInstanceMethodNotDefined < ::Trax::Core::Errors::Base
  argument :method_name, :required => true
  argument :klass, :required => true

  message {
    "Abstract instance method, #{method_name} not defined for #{klass}"
  }
end

raise ::AbstractInstanceMethodNotDefined.new(:method_name => "my_method", :klass => self.class.name)