Class: DataObjects::Result

Inherits:
Object show all
Defined in:
lib/gems/data_objects-0.9.10.1/lib/data_objects/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command, affected_rows, insert_id = nil) ⇒ Result

Returns a new instance of Result.



5
6
7
# File 'lib/gems/data_objects-0.9.10.1/lib/data_objects/result.rb', line 5

def initialize(command, affected_rows, insert_id = nil)
  @command, @affected_rows, @insert_id = command, affected_rows, insert_id
end

Instance Attribute Details

#affected_rowsObject

Returns the value of attribute affected_rows.



3
4
5
# File 'lib/gems/data_objects-0.9.10.1/lib/data_objects/result.rb', line 3

def affected_rows
  @affected_rows
end

#insert_idObject

Returns the value of attribute insert_id.



3
4
5
# File 'lib/gems/data_objects-0.9.10.1/lib/data_objects/result.rb', line 3

def insert_id
  @insert_id
end

Instance Method Details

#to_iObject



9
10
11
# File 'lib/gems/data_objects-0.9.10.1/lib/data_objects/result.rb', line 9

def to_i
  @affected_rows
end