Sha256: bcf8714a570c098daf267e381cc3f4ddc7312961240f1162ca06d49dab194664

Contents?: true

Size: 735 Bytes

Versions: 2

Compression:

Stored size: 735 Bytes

Contents

module Dimensions
  class Account < ActiveRecord::Base
    include Rubiks::Dimension

    hierarchy 'Asset/Liability' do
      level :asset_liability
      level :account_type
    end

    hierarchy 'Institution' do
      level :institution
    end
  end

  class Customer < ActiveRecord::Base
    include Rubiks::Dimension

    hierarchy 'Gender' do
      level :gender
    end
  end

  class Date < ActiveRecord::Base
    include Rubiks::Dimension

    hierarchy 'Date' do
      level :year
      level :quarter
      level :month
    end
  end
end

module Facts
  class AccountSnapshot < ActiveRecord::Base
    include Rubiks::Fact

    dimension :account
    dimension :customer
    dimension :date

    measure :balance
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rubiks-0.0.3 examples/finance/domain.rb
rubiks-0.0.2 examples/finance/domain.rb