Class: Utils::IRB::Service::Proxy

Inherits:
Object
  • Object
show all
Defined in:
lib/utils/irb.rb

Instance Method Summary collapse

Constructor Details

#initialize(irb) ⇒ Proxy

Returns a new instance of Proxy.



468
469
470
# File 'lib/utils/irb.rb', line 468

def initialize(irb)
  @irb = irb
end

Instance Method Details

#eval(code) ⇒ Object



472
473
474
# File 'lib/utils/irb.rb', line 472

def eval(code)
  @irb.conf.workspace.evaluate nil, code
end

#load(filename) ⇒ Object



476
477
478
479
480
481
# File 'lib/utils/irb.rb', line 476

def load(filename)
  unless filename.start_with?('/')
    filename = File.expand_path filename
  end
  @irb.load filename
end