Class: Atheme::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/atheme/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#errorObject (readonly)

Returns the value of attribute error.



3
4
5
# File 'lib/atheme/error.rb', line 3

def error
  @error
end

#skipped_methodsObject (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

Returns:

  • (Boolean)


14
15
16
# File 'lib/atheme/error.rb', line 14

def error?
  true
end

#success?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/atheme/error.rb', line 10

def success?
  false
end