Class: Peruby::Op::PackageSwitch
Overview
Changes the package used for unqualified global names.
Instance Method Summary collapse
-
#initialize(name) ⇒ PackageSwitch
constructor
A new instance of PackageSwitch.
- #run(env, _context) ⇒ Object
Methods inherited from Base
#argument_cells, #local_slot, #lvalue, #run_subroutine, #to_callable, #warning_directive?
Constructor Details
#initialize(name) ⇒ PackageSwitch
Returns a new instance of PackageSwitch.
132 |
# File 'lib/peruby/op/control.rb', line 132 def initialize(name) = @name = name |
Instance Method Details
#run(env, _context) ⇒ Object
133 |
# File 'lib/peruby/op/control.rb', line 133 def run(env, _context) = env.package = @name |