Exception: ActiveMocker::UnknownAttributeError

Inherits:
NoMethodError
  • Object
show all
Defined in:
lib/active_mocker/mock/exceptions.rb

Overview

Raised when unknown attributes are supplied via mass assignment.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(record, attribute) ⇒ UnknownAttributeError

Returns a new instance of UnknownAttributeError.



18
19
20
21
22
# File 'lib/active_mocker/mock/exceptions.rb', line 18

def initialize(record, attribute)
  @record    = record
  @attribute = attribute.to_s
  super("unknown attribute: #{attribute}")
end

Instance Attribute Details

#attributeObject (readonly)

Returns the value of attribute attribute.



16
17
18
# File 'lib/active_mocker/mock/exceptions.rb', line 16

def attribute
  @attribute
end

#recordObject (readonly)

Returns the value of attribute record.



16
17
18
# File 'lib/active_mocker/mock/exceptions.rb', line 16

def record
  @record
end