class SAPNW::RFC::Table

RFC Table type Parameters

Public Instance Methods

each() { |row| ... } click to toggle source

Yields each row of the table to passed Proc

# File lib/sapnwrfc/parameters.rb, line 260
def each
        return nil unless @value
              @value.each do |row|
                yield row
              end
      end
length() click to toggle source

returns the no. of rows currently in the table

# File lib/sapnwrfc/parameters.rb, line 239
def length
  return @value.length
end
value=(val=[]) click to toggle source

assign an Array, of rows represented by Hashes to the value of the Table parameter.

# File lib/sapnwrfc/parameters.rb, line 245
          def value=(val=[])
unless val.is_a?(Array)
                    raise TypeError, "Must be Array for table value (#{@name}/#{val.class})\n"
                        end
                        cnt = 0
                  val.each do |row|
                          cnt += 1
  unless row.is_a?(Hash)
                      raise TypeError, "Must be Hash for table row value (#{@name}/#{cnt}/#{row.class})\n"
                          end
                        end
                        @value = val
                end

Public Class Methods

new(*args) click to toggle source
# File lib/sapnwrfc/parameters.rb, line 233
def initialize(*args)
        @direction = SAPNW::RFC::TABLES
              super
      end