Sha256: f2ac1a759daf635186f6696caae5e77f3a80672559c0ef0db09bb857c2a0cf02

Contents?: true

Size: 687 Bytes

Versions: 205

Compression:

Stored size: 687 Bytes

Contents

module Origen
  module Registers
    # This is a regular Ruby hash that is used to store collections of Reg objects, it has additional
    # methods added to allow interaction with the contained registers.
    # All Ruby hash methods are also available - http://www.ruby-doc.org/core/classes/Hash.html
    class RegCollection < Hash
      # Returns the object that owns the registers
      attr_reader :owner

      def initialize(owner, _options = {})
        @owner = owner
      end

      def inspect
        map { |k, _v| k }.inspect
      end

      # Display all regs visually in a console session
      def show
        puts map { |_k, v| v }.inspect
      end
    end
  end
end

Version data entries

205 entries across 205 versions & 1 rubygems

Version Path
origen-0.42.0 lib/origen/registers/reg_collection.rb
origen-0.41.2 lib/origen/registers/reg_collection.rb
origen-0.41.1 lib/origen/registers/reg_collection.rb
origen-0.41.0 lib/origen/registers/reg_collection.rb
origen-0.40.2 lib/origen/registers/reg_collection.rb
origen-0.40.1 lib/origen/registers/reg_collection.rb
origen-0.40.0 lib/origen/registers/reg_collection.rb
origen-0.38.0 lib/origen/registers/reg_collection.rb
origen-0.37.0 lib/origen/registers/reg_collection.rb
origen-0.36.1 lib/origen/registers/reg_collection.rb
origen-0.36.0 lib/origen/registers/reg_collection.rb
origen-0.35.1 lib/origen/registers/reg_collection.rb
origen-0.35.0 lib/origen/registers/reg_collection.rb
origen-0.34.3 lib/origen/registers/reg_collection.rb
origen-0.34.2 lib/origen/registers/reg_collection.rb
origen-0.34.1 lib/origen/registers/reg_collection.rb
origen-0.34.0 lib/origen/registers/reg_collection.rb
origen-0.33.3 lib/origen/registers/reg_collection.rb
origen-0.33.2 lib/origen/registers/reg_collection.rb
origen-0.33.1 lib/origen/registers/reg_collection.rb