Class: Q::ToplevelScope

Inherits:
Scope
  • Object
show all
Defined in:
lib/q/vm.rb

Instance Method Summary collapse

Methods inherited from Scope

#[], #[]=, #args, #args=, #has?, #has_own?, #inspect, #this, #this=

Constructor Details

#initializeToplevelScope

Returns a new instance of ToplevelScope.



40
41
42
43
44
45
46
# File 'lib/q/vm.rb', line 40

def initialize
  super()

  self['puts'] = lambda { |scope|
    puts scope.args
  }
end