Sha256: 798d07fe552e8c9c78d791d789eabfcc622cb34613187de2ccb970eb3528ec85

Contents?: true

Size: 435 Bytes

Versions: 8

Compression:

Stored size: 435 Bytes

Contents

# frozen_string_literal: true

module Zizia
  class MetadataUsage
    include Singleton

    def usage
      YAML.load_file(config)
    end

    private

      def default_location
        File.join(File.dirname(__FILE__), '../../config/usage.yml')
      end

      def config
        return default_location unless File.exist?(Rails.root.join("config", "usage.yml"))
        Rails.root.join("config", "usage.yml")
      end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
zizia-4.5.4.alpha.01 app/lib/zizia/metadata_usage.rb
zizia-4.5.3.alpha.01 app/lib/zizia/metadata_usage.rb
zizia-4.5.2.alpha.01 app/lib/zizia/metadata_usage.rb
zizia-4.5.1.alpha.01 app/lib/zizia/metadata_usage.rb
zizia-4.4.1.alpha.01 app/lib/zizia/metadata_usage.rb
zizia-4.4.0.alpha.01 app/lib/zizia/metadata_usage.rb
zizia-4.3.1.alpha.01 app/lib/zizia/metadata_usage.rb
zizia-4.2.0.alpha.01 app/lib/zizia/metadata_usage.rb