Class: RailsDb::MysqlResult
- Inherits:
-
Object
- Object
- RailsDb::MysqlResult
- Defined in:
- lib/rails_db/mysql_result.rb
Instance Attribute Summary collapse
-
#columns ⇒ Object
readonly
Returns the value of attribute columns.
-
#rows ⇒ Object
readonly
Returns the value of attribute rows.
Instance Method Summary collapse
-
#initialize(result) ⇒ MysqlResult
constructor
A new instance of MysqlResult.
Constructor Details
#initialize(result) ⇒ MysqlResult
Returns a new instance of MysqlResult.
8 9 10 11 12 13 14 15 |
# File 'lib/rails_db/mysql_result.rb', line 8 def initialize(result) @columns = [] @rows = [] if result @columns = result.fields @rows = result.entries end end |
Instance Attribute Details
#columns ⇒ Object (readonly)
Returns the value of attribute columns.
4 5 6 |
# File 'lib/rails_db/mysql_result.rb', line 4 def columns @columns end |
#rows ⇒ Object (readonly)
Returns the value of attribute rows.
4 5 6 |
# File 'lib/rails_db/mysql_result.rb', line 4 def rows @rows end |