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.59.5 lib/origen/registers/reg_collection.rb
origen-0.59.4 lib/origen/registers/reg_collection.rb
origen-0.59.3 lib/origen/registers/reg_collection.rb
origen-0.59.2 lib/origen/registers/reg_collection.rb
origen-0.59.1 lib/origen/registers/reg_collection.rb
origen-0.59.0 lib/origen/registers/reg_collection.rb
origen-0.58.0 lib/origen/registers/reg_collection.rb
origen-0.57.2 lib/origen/registers/reg_collection.rb
origen-0.57.1 lib/origen/registers/reg_collection.rb
origen-0.57.0 lib/origen/registers/reg_collection.rb
origen-0.56.0 lib/origen/registers/reg_collection.rb
origen-0.55.5 lib/origen/registers/reg_collection.rb
origen-0.55.4 lib/origen/registers/reg_collection.rb
origen-0.55.3 lib/origen/registers/reg_collection.rb
origen-0.55.2 lib/origen/registers/reg_collection.rb
origen-0.55.1 lib/origen/registers/reg_collection.rb
origen-0.55.0 lib/origen/registers/reg_collection.rb
origen-0.54.6 lib/origen/registers/reg_collection.rb
origen-0.54.5 lib/origen/registers/reg_collection.rb
origen-0.54.4 lib/origen/registers/reg_collection.rb