Class: Suricata::Counter

Inherits:
Object
  • Object
show all
Defined in:
lib/suricata/surilizer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(start = 0) ⇒ Counter


8
9
10
# File 'lib/suricata/surilizer.rb', line 8

def initialize(start=0)
@count = start
end

Instance Attribute Details

#countObject (readonly)

Returns the value of attribute count


6
7
8
# File 'lib/suricata/surilizer.rb', line 6

def count
  @count
end

Instance Method Details

#increaseObject


12
13
14
# File 'lib/suricata/surilizer.rb', line 12

def increase
@count += 1
end

#to_sObject


16
17
18
# File 'lib/suricata/surilizer.rb', line 16

def to_s
  "#{@count}"
end