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

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

Instance Method Summary collapse

Constructor Details

#initialize(irb) ⇒ Proxy

Returns a new instance of Proxy.



24
25
26
# File 'lib/utils/irb/service.rb', line 24

def initialize(irb)
  @irb = irb
end

Instance Method Details

#eval(code) ⇒ Object



28
29
30
# File 'lib/utils/irb/service.rb', line 28

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

#load(filename) ⇒ Object



32
33
34
35
36
37
# File 'lib/utils/irb/service.rb', line 32

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