class Vissen::Parameterized::GlobalScope

The global scope is by definition a singleton and exists as the top level parent of all other scopes.

Public Class Methods

new() click to toggle source
# File lib/vissen/parameterized/global_scope.rb, line 46
def initialize; end

Public Instance Methods

alive?() click to toggle source

@see dead?

@return [true]

# File lib/vissen/parameterized/global_scope.rb, line 20
def alive?
  true
end
dead?() click to toggle source

The global scope can never die.

@return [false]

# File lib/vissen/parameterized/global_scope.rb, line 13
def dead?
  false
end
include_scope?(scope) click to toggle source

The only scope that is included in the global scope is the global scope itself.

@param scope [Object] the scope to check. @return [true] if the given scope is the global scope. @return [false] otherwise.

# File lib/vissen/parameterized/global_scope.rb, line 35
def include_scope?(scope)
  equal?(scope)
end
kill!() click to toggle source

@raise [RuntimeError]

# File lib/vissen/parameterized/global_scope.rb, line 25
def kill!
  raise 'The global scope cannot be killed'
end
parent() click to toggle source

@raise [StopIteration]

# File lib/vissen/parameterized/global_scope.rb, line 40
def parent
  raise StopIteration
end