Module: StandardExceptions::ExceptionInterface
- Included in:
- Exception
- Defined in:
- lib/standard_exceptions.rb
Instance Attribute Summary collapse
- #inner ⇒ Object
-
#status ⇒ Object
Returns the value of attribute status.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#inner ⇒ Object
9 10 11 |
# File 'lib/standard_exceptions.rb', line 9 def inner @inner || self.cause end |
#status ⇒ Object
Returns the value of attribute status.
6 7 8 |
# File 'lib/standard_exceptions.rb', line 6 def status @status end |
Class Method Details
.human_name(e_class = self) ⇒ Object
eg. ‘Not Found’
14 15 16 17 18 |
# File 'lib/standard_exceptions.rb', line 14 def self.human_name(e_class=self) i = e_class.name.rindex('::') base_name = e_class.name[(i+2)..-1] base_name.split(/(?=[A-Z])/).join(' ') end |
Instance Method Details
#human_name ⇒ Object
20 21 22 |
# File 'lib/standard_exceptions.rb', line 20 def human_name self.class.human_name end |