Sha256: 3bf065300fad4a55494bfb1bd55c97caf6e7b5cbe48882261f79dc43fa76da80

Contents?: true

Size: 946 Bytes

Versions: 13

Compression:

Stored size: 946 Bytes

Contents

require 'forwardable'

module BEL
  module Model
    class References

      attr_reader :values

      extend Forwardable
      include Enumerable

      ANNOTATION_DEFINITIONS = :annotation_definitions
      NAMESPACE_DEFINITIONS  = :namespace_definitions

      def initialize(values = {})
        @values = values
      end

      def annotation_definitions
        @values[ANNOTATION_DEFINITIONS] ||= {}
      end

      def annotation_definitions=(annotation_definitions)
        @values[ANNOTATION_DEFINITIONS] = annotation_definitions
      end

      def namespace_definitions
        @values[NAMESPACE_DEFINITIONS] ||= {}
      end

      def namespace_definitions=(namespace_definitions)
        @values[NAMESPACE_DEFINITIONS] = namespace_definitions
      end

      def_delegators :@values, :[],    :"[]=", :delete_if,   :each, :each_pair,
                               :fetch, :keys,  :size,        :sort, :store
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
bel-0.3.3-x64-mingw32 lib/bel/evidence_model/references.rb
bel-0.3.3-x86-mingw32 lib/bel/evidence_model/references.rb
bel-0.3.3 lib/bel/evidence_model/references.rb
bel-0.3.2-x64-mingw32 lib/bel/evidence_model/references.rb
bel-0.3.2-x86-mingw32 lib/bel/evidence_model/references.rb
bel-0.3.2 lib/bel/evidence_model/references.rb
bel-0.3.1-x64-mingw32 lib/bel/evidence_model/references.rb
bel-0.3.1-x86-mingw32 lib/bel/evidence_model/references.rb
bel-0.3.1 lib/bel/evidence_model/references.rb
bel-0.3.0-x86-mingw32 lib/bel/evidence_model/references.rb
bel-0.3.0-x64-mingw32 lib/bel/evidence_model/references.rb
bel-0.3.0 lib/bel/evidence_model/references.rb
bel-0.3.0.beta6 lib/bel/evidence_model/references.rb