Class: RCheck::DSL::Scope
- Inherits:
-
Object
- Object
- RCheck::DSL::Scope
- Extended by:
- Forwardable
- Defined in:
- lib/rcheck/dsl.rb
Instance Method Summary collapse
-
#initialize(suite) ⇒ Scope
constructor
A new instance of Scope.
- #method_missing(*args) ⇒ Object
- #respond_to?(name) ⇒ Boolean
Constructor Details
#initialize(suite) ⇒ Scope
Returns a new instance of Scope.
5 6 7 |
# File 'lib/rcheck/dsl.rb', line 5 def initialize(suite) @__suite__ = suite end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/rcheck/dsl.rb', line 17 def method_missing(*args) if @__suite__.parent @__suite__.parent.scope.send(*args) else super end end |
Instance Method Details
#respond_to?(name) ⇒ Boolean
13 14 15 |
# File 'lib/rcheck/dsl.rb', line 13 def respond_to?(name) super || @__suite__.parent && @__suite__.parent.scope.respond_to?(name) end |