Class: Rserve::REXP::Raw

Inherits:
Vector show all
Defined in:
lib/rserve/rexp/raw.rb

Constant Summary

Constants inherited from Rserve::REXP

MaxDebugItems, MismatchError

Instance Attribute Summary

Attributes inherited from Vector

#payload

Attributes inherited from Rserve::REXP

#attr

Instance Method Summary collapse

Methods inherited from Vector

#==, #na?, #to_a, #to_ruby_internal, #vector?

Methods inherited from Rserve::REXP

#as_double, #as_double_matrix, #as_doubles, #as_factor, #as_float, #as_floats, #as_integer, #as_integers, #as_list, #as_matrix, #as_nested_array, #as_string, #as_strings, #complex?, create_data_frame, #dim, #environment?, #expression?, #factor?, #get_attribute, #has_attribute?, #inherits?, #integer?, #language?, #list?, #logical?, #na?, #null?, #numeric?, #pair_list?, #recursive?, #reference?, #split_array, #string?, #symbol?, #to_debug_string, #to_f, #to_i, #to_ruby, #to_ruby_internal, #vector?

Constructor Details

#initialize(l, attr = nil) ⇒ Raw

Returns a new instance of Raw.



4
5
6
7
# File 'lib/rserve/rexp/raw.rb', line 4

def initialize(l,attr=nil)
  super(attr);
  @payload=(l.nil?) ? Array.new() : l;
end

Instance Method Details

#as_bytesObject



14
15
16
# File 'lib/rserve/rexp/raw.rb', line 14

def as_bytes
  @payload
end

#lengthObject



8
9
10
# File 'lib/rserve/rexp/raw.rb', line 8

def length
  @payload.length
end

#raw?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/rserve/rexp/raw.rb', line 11

def raw?
  true
end