Exception: Bright::UnknownAttributeError

Inherits:
NoMethodError
  • Object
show all
Defined in:
lib/bright/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(record, attribute) ⇒ UnknownAttributeError

Returns a new instance of UnknownAttributeError.



28
29
30
31
32
# File 'lib/bright/errors.rb', line 28

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

Instance Attribute Details

#attributeObject (readonly)

Returns the value of attribute attribute.



26
27
28
# File 'lib/bright/errors.rb', line 26

def attribute
  @attribute
end

#recordObject (readonly)

Returns the value of attribute record.



26
27
28
# File 'lib/bright/errors.rb', line 26

def record
  @record
end