Exception: Uinit::Structure::AttributeTypeError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attribute, type_error) ⇒ AttributeTypeError

Returns a new instance of AttributeTypeError.



6
7
8
9
10
11
12
13
# File 'lib/uinit/structure/attribute_type_error.rb', line 6

def initialize(attribute, type_error)
  super()

  @attribute = attribute
  @type_error = type_error

  set_backtrace(type_error.backtrace)
end

Instance Attribute Details

#attributeObject (readonly)

Returns the value of attribute attribute.



15
16
17
# File 'lib/uinit/structure/attribute_type_error.rb', line 15

def attribute
  @attribute
end

#type_errorObject (readonly)

Returns the value of attribute type_error.



15
16
17
# File 'lib/uinit/structure/attribute_type_error.rb', line 15

def type_error
  @type_error
end

Instance Method Details

#messageObject



17
18
19
# File 'lib/uinit/structure/attribute_type_error.rb', line 17

def message
  "Type error on attribute '#{attribute.name}', detail:\n#{type_error.message}"
end