Class: Symbol
- Inherits:
-
Object
- Object
- Symbol
- Defined in:
- lib/extensions/symbol.rb
Class Method Summary collapse
-
.operator(operators) ⇒ Object
OPERATORS.
Instance Method Summary collapse
-
#desc ⇒ Object
Sorting.
-
#to_ga ⇒ Object
Metric filters.
Class Method Details
.operator(operators) ⇒ Object
OPERATORS
4 5 6 7 8 9 10 11 12 |
# File 'lib/extensions/symbol.rb', line 4 def self.operator(operators) operators.each do |method, operator| class_eval " def \#{method}\n Operator.new(self, '\#{operator}')\n end\n CODE\n end\nend\n" |
Instance Method Details
#desc ⇒ Object
Sorting
15 16 17 |
# File 'lib/extensions/symbol.rb', line 15 def desc Operator.new(self, '-', true) end |
#to_ga ⇒ Object
Metric filters
33 34 35 |
# File 'lib/extensions/symbol.rb', line 33 def to_ga "ga:#{self.to_s.lower_camelized}" end |