module vs. class

pull/6827/head
Philipp Tessenow 14 years ago
parent da067d7bc2
commit c066d1ee6d
  1. 10
      app/models/report/filter.rb
  2. 2
      app/models/report/filter/base.rb
  3. 2
      app/models/report/group_by/ruby_aggregation.rb
  4. 2
      app/models/report/group_by/singleton_value.rb
  5. 2
      app/models/report/group_by/sql_aggregation.rb

@ -1,17 +1,15 @@
require "set"
module Report::Filter
extend self
def all
class Report::Filter
def self.all
@all ||= Set[]
end
def all_grouped
def self.all_grouped
all.group_by { |f| f.applies_for }.to_a.sort { |a,b| a.first.to_s <=> b.first.to_s }
end
def from_hash
def self.from_hash
raise NotImplementedError
end
end

@ -1,4 +1,4 @@
module Report::Filter
class Report::Filter
class Base < Report::Chainable
Report::Operator.load

@ -1,4 +1,4 @@
module Report::GroupBy
class Report::GroupBy
module RubyAggregation
def responsible_for_sql?
false

@ -1,4 +1,4 @@
module Report::GroupBy
class Report::GroupBy
class SingletonValue < Base
dont_display!
end

@ -1,4 +1,4 @@
module Report::GroupBy
class Report::GroupBy
module SqlAggregation
def responsible_for_sql?
true

Loading…
Cancel
Save