Class: Adhoq::Result
- Inherits:
-
Object
- Object
- Adhoq::Result
- Defined in:
- lib/adhoq/result.rb
Instance Attribute Summary collapse
-
#header ⇒ Object
readonly
Returns the value of attribute header.
-
#rows ⇒ Object
readonly
Returns the value of attribute rows.
Instance Method Summary collapse
- #<<(row) ⇒ Object
- #==(obj) ⇒ Object
-
#initialize(header, rows = []) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(header, rows = []) ⇒ Result
Returns a new instance of Result.
5 6 7 8 |
# File 'lib/adhoq/result.rb', line 5 def initialize(header, rows = []) @header = header @rows = rows end |
Instance Attribute Details
#header ⇒ Object (readonly)
Returns the value of attribute header.
3 4 5 |
# File 'lib/adhoq/result.rb', line 3 def header @header end |
#rows ⇒ Object (readonly)
Returns the value of attribute rows.
3 4 5 |
# File 'lib/adhoq/result.rb', line 3 def rows @rows end |
Instance Method Details
#<<(row) ⇒ Object
10 11 12 |
# File 'lib/adhoq/result.rb', line 10 def <<(row) rows << row end |
#==(obj) ⇒ Object
14 15 16 |
# File 'lib/adhoq/result.rb', line 14 def ==(obj) header == obj.header && rows == obj.rows end |