class RObject::Base

Attributes

robj[R]

Public Class Methods

delegate_to_R(from_to) click to toggle source
# File lib/robject/base.rb, line 5
def self.delegate_to_R from_to
  from_to.each do |from, to|
    define_method(from) do |*args|
      R[to].call @robj, *args
    end
  end
end
match?(robj, type) click to toggle source
# File lib/robject/base.rb, line 13
def self.match? robj, type
  true
end
new(robj) click to toggle source
Calls superclass method
# File lib/robject/base.rb, line 22
def initialize robj
  @robj = robj
  super robj
end

Public Instance Methods

__getobj__() click to toggle source
# File lib/robject/base.rb, line 35
def __getobj__
  to_ruby
end
as_r() click to toggle source
# File lib/robject/base.rb, line 39
def as_r
  @robj.as_r
end
is_function?() click to toggle source
# File lib/robject/base.rb, line 47
def is_function?
  R.rsruby.is_function(@robj).to_ruby
end
method_missing(name, *args, &block) click to toggle source
Calls superclass method
# File lib/robject/base.rb, line 27
def method_missing name, *args, &block
  if name =~ /^[\-+*\/!><&|\^]+$/
    R[name.to_s].call @robj, *args
  else
    super
  end
end
to_ruby(mode = ::RSRuby::BASIC_CONVERSION) click to toggle source
# File lib/robject/base.rb, line 43
def to_ruby mode = ::RSRuby::BASIC_CONVERSION
  @robj.to_ruby mode
end