Sha256: a71a76c0fea3d141236beac199a807f2efd82cd5088302803c3b57d268d5852a

Contents?: true

Size: 799 Bytes

Versions: 11

Compression:

Stored size: 799 Bytes

Contents

module Martyr
  module Schema
    class CustomRollup < BaseMetric
      attr_accessor :cube_name, :name, :block, :depends_on

      def build_data_slice(*)
        raise Runtime::Error.new("Rollups cannot be sliced: attempted on rollup `#{name}`")
      end

      def build_memory_slice(*)
        raise Runtime::Error.new("Rollups cannot be sliced: attempted on rollup `#{name}`")
      end

      # @param fact_scopes [Runtime::FactScopeCollection]
      def add_to_select(fact_scopes)
        # no-op
      end

      def extract(fact)
        raise Runtime::Error.new("Rollups cannot be extracted: attempted on rollup `#{name}`")
      end

      # @override
      # @param element [Runtime::Element]
      def rollup(element)
        element.instance_exec(&block)
      end

    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
martyr-0.1.85.pre lib/martyr/schema/metrics/custom_rollup.rb
martyr-0.1.84.pre lib/martyr/schema/metrics/custom_rollup.rb
martyr-0.1.82.pre lib/martyr/schema/metrics/custom_rollup.rb
martyr-0.1.81.pre lib/martyr/schema/metrics/custom_rollup.rb
martyr-0.1.80.pre lib/martyr/schema/metrics/custom_rollup.rb
martyr-0.1.79.pre lib/martyr/schema/metrics/custom_rollup.rb
martyr-0.1.78.pre lib/martyr/schema/metrics/custom_rollup.rb
martyr-0.1.77.pre lib/martyr/schema/metrics/custom_rollup.rb
martyr-0.1.76.pre lib/martyr/schema/metrics/custom_rollup.rb
martyr-0.1.75.pre lib/martyr/schema/metrics/custom_rollup.rb
martyr-0.1.74.pre lib/martyr/schema/metrics/custom_rollup.rb