Class: Result

Inherits:
Object
  • Object
show all
Defined in:
lib/adobe_connect_api/result.rb

Overview

Result objects are returned by some of the convenience methods to make the resulting values more accessible. The status attribute returns the status/@code field and the rows attribute is an array of hashes with the values of the resulting rows (or quotas etc.)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, rows) ⇒ Result

Returns a new instance of Result.



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/adobe_connect_api/result.rb', line 11

def initialize (status, rows)
  @status = status
  @rows = []
  if rows != nil
    rows.each do |row|
      hash = {}
      row.each_pair do |name, val|
        if val.is_a?(Array)
          hash[name] = val[0]
        else
          hash[name] = val
        end
      end
      @rows.push hash
    end
  end
end

Instance Attribute Details

#rowsObject (readonly)

Returns the value of attribute rows.



9
10
11
# File 'lib/adobe_connect_api/result.rb', line 9

def rows
  @rows
end

#statusObject (readonly)

Returns the value of attribute status.



8
9
10
# File 'lib/adobe_connect_api/result.rb', line 8

def status
  @status
end