Exception: Reaction::AttributeError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/reaction/errors/attribute_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attribute, message = nil) ⇒ AttributeError

Returns a new instance of AttributeError.



6
7
8
9
# File 'lib/reaction/errors/attribute_error.rb', line 6

def initialize(attribute, message = nil)
  @attribute = attribute
  @message = message || "Missing value for attribute: #{attribute}."
end

Instance Attribute Details

#attributeObject

Returns the value of attribute attribute.



3
4
5
# File 'lib/reaction/errors/attribute_error.rb', line 3

def attribute
  @attribute
end

#messageObject

Returns the value of attribute message.



4
5
6
# File 'lib/reaction/errors/attribute_error.rb', line 4

def message
  @message
end