Rserve::REXP::List

Attributes

payload[R]

Public Class Methods

new(list, attrs=nil) click to toggle source
# File lib/rserve/rexp/list.rb, line 5
def initialize(list, attrs=nil)
  @payload=list.nil? ? RList.new : list
  super(attrs)
end

Public Instance Methods

as_list() click to toggle source
# File lib/rserve/rexp/list.rb, line 21
def as_list
  @payload
end
length() click to toggle source
# File lib/rserve/rexp/list.rb, line 9
def length
  payload.size
end
list?() click to toggle source
# File lib/rserve/rexp/list.rb, line 12
def list?
  true
end
pair_list?() click to toggle source
# File lib/rserve/rexp/list.rb, line 15
def pair_list?
  true
end
recursive?() click to toggle source
# File lib/rserve/rexp/list.rb, line 18
def recursive?
  true
end
to_debug_string() click to toggle source
# File lib/rserve/rexp/list.rb, line 27
def to_debug_string
  t=super+(as_list.named? ? "named":"")
  if @payload.named?
    inner="{"+@payload.size.times.map {|i| "#{@payload.names[i]}=#{@payload.data[i].to_debug_string}"}.join(",")+"}"
  else
    inner="{"+@payload.size.times.map {|i| "#{@payload.data[i].to_debug_string}"}.join(",")+"}"
  end
  t+inner
end
to_ruby_internal() click to toggle source
# File lib/rserve/rexp/list.rb, line 36
def to_ruby_internal
  as_list.to_ruby
end
to_s() click to toggle source
# File lib/rserve/rexp/list.rb, line 24
def to_s
  super+(as_list.named? ? "named":"")
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.