Class: Atheme::Error
- Inherits:
-
Object
- Object
- Atheme::Error
- Defined in:
- lib/atheme/error.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#skipped_methods ⇒ Object
readonly
Returns the value of attribute skipped_methods.
Instance Method Summary collapse
- #error? ⇒ Boolean
-
#initialize(error = nil) ⇒ Error
constructor
A new instance of Error.
- #method_missing(meth, *args, &block) ⇒ Object
- #success? ⇒ Boolean
Constructor Details
#initialize(error = nil) ⇒ Error
Returns a new instance of Error.
5 6 7 8 |
# File 'lib/atheme/error.rb', line 5 def initialize(error=nil) @error = error || $! @skipped_methods = [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object
18 19 20 21 |
# File 'lib/atheme/error.rb', line 18 def method_missing(meth, *args, &block) @skipped_methods << [meth, args, block] self end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
3 4 5 |
# File 'lib/atheme/error.rb', line 3 def error @error end |
#skipped_methods ⇒ Object (readonly)
Returns the value of attribute skipped_methods.
3 4 5 |
# File 'lib/atheme/error.rb', line 3 def skipped_methods @skipped_methods end |
Instance Method Details
#error? ⇒ Boolean
14 15 16 |
# File 'lib/atheme/error.rb', line 14 def error? true end |
#success? ⇒ Boolean
10 11 12 |
# File 'lib/atheme/error.rb', line 10 def success? false end |