Class: RIO::Handle

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

Overview

:nodoc: all

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#to_a

Constructor Details

#initialize(st = nil) ⇒ Handle

Returns a new instance of Handle.



31
32
33
# File 'lib/rio/handle.rb', line 31

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



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

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.



30
31
32
# File 'lib/rio/handle.rb', line 30

def target
  @target
end

Instance Method Details

#callstr(func, *args) ⇒ Object



48
49
50
# File 'lib/rio/handle.rb', line 48

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

#initialize_copy(*args) ⇒ Object



34
35
36
37
38
# File 'lib/rio/handle.rb', line 34

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

#split(*args, &block) ⇒ Object



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

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

#t_class(*args) ⇒ Object



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

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

#t_instance_of?(*args) ⇒ Boolean

Returns:

  • (Boolean)


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

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

#t_kind_of?(*args) ⇒ Boolean

Returns:

  • (Boolean)


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

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

#to_sObject



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

def to_s() @target.to_s() end