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?

Instance Attribute Details

#colorObject

Returns the value of attribute color.



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

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)


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

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

#groupObject



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

def group
  [@label, @color]
end