Class: Threshold::EventFilter
- Inherits:
-
Object
- Object
- Threshold::EventFilter
- Includes:
- Comparable, Standalone
- Defined in:
- lib/threshold/event_filter.rb
Instance Attribute Summary collapse
-
#comment ⇒ Object
Returns the value of attribute comment.
-
#count ⇒ Object
Returns the value of attribute count.
-
#gid ⇒ Object
Returns the value of attribute gid.
-
#seconds ⇒ Object
Returns the value of attribute seconds.
-
#sid ⇒ Object
Returns the value of attribute sid.
-
#track_by ⇒ Object
Returns the value of attribute track_by.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(line = "") ⇒ EventFilter
constructor
A new instance of EventFilter.
- #to_s(skip = false) ⇒ Object
Methods included from Standalone
Constructor Details
#initialize(line = "") ⇒ EventFilter
Returns a new instance of EventFilter.
82 83 84 |
# File 'lib/threshold/event_filter.rb', line 82 def initialize(line="") transform(line) unless line.empty? end |
Instance Attribute Details
#comment ⇒ Object
Returns the value of attribute comment.
76 77 78 |
# File 'lib/threshold/event_filter.rb', line 76 def comment @comment end |
#count ⇒ Object
Returns the value of attribute count.
76 77 78 |
# File 'lib/threshold/event_filter.rb', line 76 def count @count end |
#gid ⇒ Object
Returns the value of attribute gid.
76 77 78 |
# File 'lib/threshold/event_filter.rb', line 76 def gid @gid end |
#seconds ⇒ Object
Returns the value of attribute seconds.
76 77 78 |
# File 'lib/threshold/event_filter.rb', line 76 def seconds @seconds end |
#sid ⇒ Object
Returns the value of attribute sid.
76 77 78 |
# File 'lib/threshold/event_filter.rb', line 76 def sid @sid end |
#track_by ⇒ Object
Returns the value of attribute track_by.
76 77 78 |
# File 'lib/threshold/event_filter.rb', line 76 def track_by @track_by end |
#type ⇒ Object
Returns the value of attribute type.
76 77 78 |
# File 'lib/threshold/event_filter.rb', line 76 def type @type end |
Instance Method Details
#to_s(skip = false) ⇒ Object
86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/threshold/event_filter.rb', line 86 def to_s(skip = false) if self.valid? if comment?(skip) "event_filter gen_id #{@gid}, sig_id #{@sid}, type #{@type}, track by_#{@track_by}, count #{@count}, seconds #{@seconds} #{@comment}" else "event_filter gen_id #{@gid}, sig_id #{@sid}, type #{@type}, track by_#{@track_by}, count #{@count}, seconds #{@seconds}" end else raise InvalidEventFilterObject, 'Event Filter did not validate' end end |