Sha256: 46490ea021c8f4d3a10a4f754fb28de5cb87bc2b4371ae74dc7aad6c775a38af

Contents?: true

Size: 876 Bytes

Versions: 135

Compression:

Stored size: 876 Bytes

Contents

module Expressir
  module Express
    class InverseAggregate < Inverse
      attr_accessor :aggrtype, :lower, :upper

      def initialize(options = {})
        @aggrtype = "SET"
        @lower = "0"
        @upper = "?"

        super(options)
      end

      private

      def extract_type_specific_attributes(document)
        @dimensions = document.xpath("aggregate").map do |aggregate|
          Express::AggregateDimension.parse(aggregate)
        end


        extract_inverse_aggregate(document)
      end

      def extract_inverse_aggregate(document)
        aggregates = document.xpath("inverse.aggregate")

        if !aggregates.empty?
          dimension = Express::AggregateDimension.parse(aggregates.first)
          @aggrtype = dimension.aggrtype
          @lower = dimension.lower
          @upper = dimension.upper
        end
      end
    end
  end
end

Version data entries

135 entries across 135 versions & 1 rubygems

Version Path
expressir-0.2.27 lib/expressir/express/inverse_aggregate.rb
expressir-0.2.27-x86_64-linux lib/expressir/express/inverse_aggregate.rb
expressir-0.2.27-x86_64-darwin lib/expressir/express/inverse_aggregate.rb
expressir-0.2.27-x86-mingw32 lib/expressir/express/inverse_aggregate.rb
expressir-0.2.27-x86-linux lib/expressir/express/inverse_aggregate.rb
expressir-0.2.27-x64-mingw32 lib/expressir/express/inverse_aggregate.rb
expressir-0.2.27-arm64-darwin lib/expressir/express/inverse_aggregate.rb
expressir-0.2.26 lib/expressir/express/inverse_aggregate.rb
expressir-0.2.26-x86_64-linux lib/expressir/express/inverse_aggregate.rb
expressir-0.2.26-x86_64-darwin lib/expressir/express/inverse_aggregate.rb
expressir-0.2.26-x86-mingw32 lib/expressir/express/inverse_aggregate.rb
expressir-0.2.26-x86-linux lib/expressir/express/inverse_aggregate.rb
expressir-0.2.26-x64-mingw32 lib/expressir/express/inverse_aggregate.rb
expressir-0.2.26-arm64-darwin lib/expressir/express/inverse_aggregate.rb
expressir-0.2.25 lib/expressir/express/inverse_aggregate.rb
expressir-0.2.25-x86_64-linux lib/expressir/express/inverse_aggregate.rb
expressir-0.2.25-x86_64-darwin lib/expressir/express/inverse_aggregate.rb
expressir-0.2.25-x86-mingw32 lib/expressir/express/inverse_aggregate.rb
expressir-0.2.25-x86-linux lib/expressir/express/inverse_aggregate.rb
expressir-0.2.25-x64-mingw32 lib/expressir/express/inverse_aggregate.rb