Class: RIO::Handle

Inherits:
Base show all
Defined in:
lib/rio/handle.rb

Overview

:nodoc: all

Constant Summary

Constants inherited from Base

Base::KEEPSYM

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(st = nil) ⇒ Handle

Returns a new instance of Handle.



42
43
44
# File 'lib/rio/handle.rb', line 42

def initialize(st=nil) 
  @target = st 
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(sym, *args, &block) ⇒ Object



50
51
52
53
# File 'lib/rio/handle.rb', line 50

def method_missing(sym,*args,&block)
  #  p callstr('method_missing',*args)
  @target.__send__(sym,*args,&block)
end

Instance Attribute Details

#targetObject

Returns the value of attribute target.



41
42
43
# File 'lib/rio/handle.rb', line 41

def target
  @target
end

Instance Method Details

#callstr(func, *args) ⇒ Object



59
60
61
# File 'lib/rio/handle.rb', line 59

def callstr(func,*args)
  self.class.to_s+'['+self.to_s+']'+'.'+func.to_s+'('+args.join(',')+')'
end

#initialize_copy(*args) ⇒ Object



45
46
47
48
49
# File 'lib/rio/handle.rb', line 45

def initialize_copy(*args)
  #p callstr('initialize_copy',*args)
  super
  @target = @target.clone
end

#split(*args, &block) ⇒ Object



58
# File 'lib/rio/handle.rb', line 58

def split(*args,&block) @target.split(*args,&block) end

#t_class(*args) ⇒ Object



56
# File 'lib/rio/handle.rb', line 56

def t_class(*args) @target.class(*args) end

#t_instance_of?(*args) ⇒ Boolean

Returns:

  • (Boolean)


54
# File 'lib/rio/handle.rb', line 54

def t_instance_of?(*args) @target.instance_of?(*args) end

#t_kind_of?(*args) ⇒ Boolean

Returns:

  • (Boolean)


55
# File 'lib/rio/handle.rb', line 55

def t_kind_of?(*args) @target.kind_of?(*args) end

#to_sObject



57
# File 'lib/rio/handle.rb', line 57

def to_s() @target.to_s() end