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.



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

def initialize(irb)
  @irb = irb
end

Instance Method Details

#eval(code) ⇒ Object



483
484
485
# File 'lib/utils/irb.rb', line 483

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

#load(filename) ⇒ Object



487
488
489
490
491
492
# File 'lib/utils/irb.rb', line 487

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