Module: Threshold::Standalone
- Included in:
- EventFilter, RateFilter, Suppression
- Defined in:
- lib/threshold/standalone.rb
Instance Method Summary collapse
-
#<=>(anOther) ⇒ Object
Comparable.
-
#==(an0ther) ⇒ Object
(also: #eql?)
Equality Methods.
-
#comment?(skip) ⇒ Boolean
Handle Comment Skipping.
- #hash ⇒ Object
Instance Method Details
#<=>(anOther) ⇒ Object
Comparable
29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/threshold/standalone.rb', line 29 def <=>(anOther) #gid <=> anOther.gid c = self.class.to_s <=> anOther.class.to_s if c == 0 then d = self.gid <=> anOther.gid if d == 0 then self.sid <=> anOther.sid else return d end else return c end end |
#==(an0ther) ⇒ Object Also known as: eql?
Equality Methods
18 19 20 |
# File 'lib/threshold/standalone.rb', line 18 def ==(an0ther) an0ther.class == self.class && an0ther.hash == hash end |
#comment?(skip) ⇒ Boolean
Handle Comment Skipping
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/threshold/standalone.rb', line 5 def comment?(skip) if skip return false else if defined?(@comment) return true else return false end end end |
#hash ⇒ Object
24 25 26 |
# File 'lib/threshold/standalone.rb', line 24 def hash state.hash end |