Class: Vissen::Parameterized::GlobalScope
- Includes:
- Singleton
- Defined in:
- lib/vissen/parameterized/global_scope.rb
Overview
The global scope is by definition a singleton and exists as the top level parent of all other scopes.
Instance Method Summary collapse
- #alive? ⇒ true
-
#dead? ⇒ false
The global scope can never die.
-
#include_scope?(scope) ⇒ true, false
The only scope that is included in the global scope is the global scope itself.
- #kill! ⇒ Object
- #parent ⇒ Object
Methods inherited from Scope
Instance Method Details
#alive? ⇒ true
20 21 22 |
# File 'lib/vissen/parameterized/global_scope.rb', line 20 def alive? true end |
#dead? ⇒ false
The global scope can never die.
13 14 15 |
# File 'lib/vissen/parameterized/global_scope.rb', line 13 def dead? false end |
#include_scope?(scope) ⇒ true, false
The only scope that is included in the global scope is the global scope itself.
35 36 37 |
# File 'lib/vissen/parameterized/global_scope.rb', line 35 def include_scope?(scope) equal?(scope) end |
#kill! ⇒ Object
25 26 27 |
# File 'lib/vissen/parameterized/global_scope.rb', line 25 def kill! raise 'The global scope cannot be killed' end |
#parent ⇒ Object
40 41 42 |
# File 'lib/vissen/parameterized/global_scope.rb', line 40 def parent raise StopIteration end |