Exception: Brigadier::Exceptions::Base

Inherits:
StandardError
  • Object
show all
Defined in:
lib/brigadier/exceptions/base.rb

Direct Known Subclasses

ValueInvalid, ValueMissing

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(obj) ⇒ Base

Returns a new instance of Base.



6
7
8
# File 'lib/brigadier/exceptions/base.rb', line 6

def initialize(obj)
  @obj = obj
end

Instance Attribute Details

#objObject (readonly)

Returns the value of attribute obj.



4
5
6
# File 'lib/brigadier/exceptions/base.rb', line 4

def obj
  @obj
end

Instance Method Details

#as_strObject



10
11
12
# File 'lib/brigadier/exceptions/base.rb', line 10

def as_str
  "%s '%s': %s" % [ parameter_type, obj.name, message ]
end