Class: ZunScript::ZRootScope
Instance Method Summary collapse
- #first_with(identifier) ⇒ Object
- #get(identifier) ⇒ Object
-
#initialize ⇒ ZRootScope
constructor
A new instance of ZRootScope.
Methods inherited from ZScope
#find, #inspect, #owner, #set, #set_local
Constructor Details
#initialize ⇒ ZRootScope
Returns a new instance of ZRootScope.
42 43 44 |
# File 'lib/zunscript/scope.rb', line 42 def initialize super end |
Instance Method Details
#first_with(identifier) ⇒ Object
46 47 48 |
# File 'lib/zunscript/scope.rb', line 46 def first_with identifier return @hash.has_key? identifier ? self : nil end |
#get(identifier) ⇒ Object
50 51 52 53 |
# File 'lib/zunscript/scope.rb', line 50 def get identifier #puts "get #{identifier} @ root: #{@hash[identifier].inspect}" return @hash[identifier] end |