Sha256: 781804aebc8d63635ae4130b4ec680436c8183b76a00147176b722a206de6d95

Contents?: true

Size: 925 Bytes

Versions: 7

Compression:

Stored size: 925 Bytes

Contents

#
# Copyright (c) 2018 Patrick Thomas.  All rights reserved.
#
require 'cayuga'

module Cayuga
  module Object
    class Constants < Singleton
      def constant(constant)
        constants[constant.symbolize]
      end

      alias [] :constant

      def directory(constant)
        directories[constant.symbolize]
      end

      def file(constant)
        files[constant.symbolize]
      end

      def repository(constant)
        repositories[constant.symbolize]
      end

      private_class_method :new

      private

      attr_reader :factory, :constants, :directories, :files, :repositories

      def initialize(factory, configuration)
        super
        @constants = configuration[:constants]
        @directories = configuration[:directories]
        @files = configuration[:files]
        @repositories = configuration[:repositories]
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
cayuga-0.0.10 lib/cayuga/object/constants.rb
cayuga-0.0.9 lib/cayuga/object/constants.rb
cayuga-0.0.8 lib/cayuga/object/constants.rb
cayuga-0.0.7 lib/cayuga/object/constants.rb
cayuga-0.0.6 lib/cayuga/object/constants.rb
cayuga-0.0.5 lib/cayuga/object/constants.rb
cayuga-0.0.4 lib/cayuga/object/constants.rb