Exception: Uinit::Structure::AttributeError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/uinit/structure/attribute_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attribute, msg) ⇒ AttributeError

Returns a new instance of AttributeError.



6
7
8
9
10
# File 'lib/uinit/structure/attribute_error.rb', line 6

def initialize(attribute, msg)
  super(msg)

  @attribute = attribute
end

Instance Attribute Details

#attributeObject (readonly)

Returns the value of attribute attribute.



12
13
14
# File 'lib/uinit/structure/attribute_error.rb', line 12

def attribute
  @attribute
end

Instance Method Details

#messageObject



14
15
16
# File 'lib/uinit/structure/attribute_error.rb', line 14

def message
  "Error on attribute '#{attribute.name}', detail:\n#{super}"
end