Exception: Assignment::UnknownAttributeError

Inherits:
NoMethodError
  • Object
show all
Defined in:
lib/assignment/attributes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(record, attribute) ⇒ UnknownAttributeError

Returns a new instance of UnknownAttributeError.



52
53
54
55
56
# File 'lib/assignment/attributes.rb', line 52

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

Instance Attribute Details

#attributeObject (readonly)

Returns the value of attribute attribute.



50
51
52
# File 'lib/assignment/attributes.rb', line 50

def attribute
  @attribute
end

#recordObject (readonly)

Returns the value of attribute record.



50
51
52
# File 'lib/assignment/attributes.rb', line 50

def record
  @record
end