Class: SimpleRecord::Stats

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_record/stats.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStats

Returns a new instance of Stats.



5
6
7
8
9
# File 'lib/simple_record/stats.rb', line 5

def initialize
    @selects = 0
    @puts = 0
    @deletes = 0
end

Instance Attribute Details

#deletesObject

Returns the value of attribute deletes.



3
4
5
# File 'lib/simple_record/stats.rb', line 3

def deletes
  @deletes
end

#putsObject

Returns the value of attribute puts.



3
4
5
# File 'lib/simple_record/stats.rb', line 3

def puts
  @puts
end

#selectsObject

Returns the value of attribute selects.



3
4
5
# File 'lib/simple_record/stats.rb', line 3

def selects
  @selects
end

Instance Method Details

#clearObject



11
12
13
14
15
# File 'lib/simple_record/stats.rb', line 11

def clear
    self.selects = 0
    self.puts = 0
    self.deletes = 0
end