Class: Quiver::Error
- Inherits:
-
Object
- Object
- Quiver::Error
- Defined in:
- lib/quiver/error.rb
Direct Known Subclasses
Action::FilterError, Action::InvalidRequestBodyError, Mapper::NotFoundError, Model::ValidationError
Instance Attribute Summary collapse
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(subject, type) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(subject, type) ⇒ Error
Returns a new instance of Error.
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/quiver/error.rb', line 5 def initialize(subject, type) if type.is_a?(Symbol) @type = type else @type = type.dup.freeze if type end if subject.is_a?(Symbol) @subject = subject else @subject = subject.dup.freeze if subject end end |
Instance Attribute Details
#subject ⇒ Object (readonly)
Returns the value of attribute subject.
3 4 5 |
# File 'lib/quiver/error.rb', line 3 def subject @subject end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/quiver/error.rb', line 3 def type @type end |
Instance Method Details
#==(other) ⇒ Object
19 20 21 22 |
# File 'lib/quiver/error.rb', line 19 def ==(other) type == other.type && subject == other.subject end |