Class: GroupingRules

Inherits:
Rules show all
Defined in:
lib/jirametrics/grouping_rules.rb

Direct Known Subclasses

DailyGroupingRules

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Rules

#hash, #ignore, #ignored?, #inspect, #state

Instance Attribute Details

#colorObject

Returns the value of attribute color.



4
5
6
# File 'lib/jirametrics/grouping_rules.rb', line 4

def color
  @color
end

#labelObject

Returns the value of attribute label.



4
5
6
# File 'lib/jirametrics/grouping_rules.rb', line 4

def label
  @label
end

Instance Method Details

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/jirametrics/grouping_rules.rb', line 6

def eql? other
  other.label == @label && other.color == @color
end

#groupObject



10
11
12
# File 'lib/jirametrics/grouping_rules.rb', line 10

def group
  [@label, @color]
end