Class: Result
- Inherits:
-
Object
- Object
- Result
- 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
-
#rows ⇒ Object
readonly
Returns the value of attribute rows.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status, rows) ⇒ Result
constructor
A new instance of Result.
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
#rows ⇒ Object (readonly)
Returns the value of attribute rows.
9 10 11 |
# File 'lib/adobe_connect_api/result.rb', line 9 def rows @rows end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
8 9 10 |
# File 'lib/adobe_connect_api/result.rb', line 8 def status @status end |