Class: RinRubyWithoutRConstant

Inherits:
RinRuby
  • Object
show all
Defined in:
lib/rinruby_without_r_constant.rb

Constant Summary collapse

DEFAULT_PORT_NUMBER =
38542

Constants inherited from RinRuby

RinRuby::EngineClosed, RinRuby::ParseError, RinRuby::RinRuby_Endian, RinRuby::RinRuby_Env, RinRuby::VERSION

Instance Attribute Summary

Attributes inherited from RinRuby

#echo_enabled, #executable, #hostname, #interactive, #port_number, #port_width, #readline

Instance Method Summary collapse

Methods inherited from RinRuby

#assign, #complete?, #echo, #eval, #method_missing, #prompt, #pull, #quit

Constructor Details

#initialize(*args) ⇒ RinRubyWithoutRConstant

Returns a new instance of RinRubyWithoutRConstant.



16
17
18
19
20
21
22
23
# File 'lib/rinruby_without_r_constant.rb', line 16

def initialize(*args)
  if args.size == 1 and args[0].kind_of?(Hash) then
    args[0][:port_number] ||= DEFAULT_PORT_NUMBER
  else
    args[3] ||= DEFAULT_PORT_NUMBER
  end
  super(*args)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RinRuby