Class: ErrorOnCall
- Inherits:
-
Object
- Object
- ErrorOnCall
- Defined in:
- lib/rspec/isolate/error_on_call.rb
Instance Method Summary collapse
-
#initialize(klass) ⇒ ErrorOnCall
constructor
A new instance of ErrorOnCall.
- #method_missing(name, *args) ⇒ Object
Constructor Details
#initialize(klass) ⇒ ErrorOnCall
2 3 4 |
# File 'lib/rspec/isolate/error_on_call.rb', line 2 def initialize(klass) @klass = klass end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
6 7 8 |
# File 'lib/rspec/isolate/error_on_call.rb', line 6 def method_missing(name, *args) raise IsolationError.new("Method :#{name} called on isolated class #{@klass.name}") end |