Sha256: 3d0f0c3817351d0803975239cbdb70673b68b7be330dbd094982cc788bf7fa0c

Contents?: true

Size: 332 Bytes

Versions: 24

Compression:

Stored size: 332 Bytes

Contents

module Toy
  module References
    extend ActiveSupport::Concern

    module ClassMethods
      def references
        @references ||= {}
      end

      def reference?(key)
        references.keys.include?(key.to_sym)
      end

      def reference(name, *args)
        Reference.new(self, name, *args)
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
toystore-0.13.2 lib/toy/references.rb
toystore-0.13.1 lib/toy/references.rb
toystore-0.13.0 lib/toy/references.rb
toystore-0.12.0 lib/toy/references.rb
toystore-0.11.0 lib/toy/references.rb
toystore-0.10.4 lib/toy/references.rb
toystore-0.10.3 lib/toy/references.rb
toystore-0.10.2 lib/toy/references.rb
toystore-0.10.1 lib/toy/references.rb
toystore-0.10.0 lib/toy/references.rb
toystore-0.9.0 lib/toy/references.rb
toystore-0.8.3 lib/toy/references.rb
toystore-0.8.2 lib/toy/references.rb
toystore-0.8.1 lib/toy/references.rb
toystore-0.8.0 lib/toy/references.rb
toystore-0.7.0 lib/toy/references.rb
toystore-0.6.6 lib/toy/references.rb
toystore-0.6.5 lib/toy/references.rb
toystore-0.6.4 lib/toy/references.rb
toystore-0.6.3 lib/toy/references.rb