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.7.16 lib/origen/registers/reg_collection.rb
origen-0.7.15 lib/origen/registers/reg_collection.rb
origen-0.7.14 lib/origen/registers/reg_collection.rb
origen-0.7.13 lib/origen/registers/reg_collection.rb
origen-0.7.12 lib/origen/registers/reg_collection.rb
origen-0.7.11 lib/origen/registers/reg_collection.rb
origen-0.7.10 lib/origen/registers/reg_collection.rb
origen-0.7.9 lib/origen/registers/reg_collection.rb
origen-0.7.8 lib/origen/registers/reg_collection.rb
origen-0.7.7 lib/origen/registers/reg_collection.rb
origen-0.7.6 lib/origen/registers/reg_collection.rb
origen-0.7.5 lib/origen/registers/reg_collection.rb
origen-0.7.4 lib/origen/registers/reg_collection.rb
origen-0.7.3 lib/origen/registers/reg_collection.rb
origen-0.7.2 lib/origen/registers/reg_collection.rb
origen-0.7.1 lib/origen/registers/reg_collection.rb
origen-0.7.0 lib/origen/registers/reg_collection.rb
origen-0.6.12 lib/origen/registers/reg_collection.rb
origen-0.6.11 lib/origen/registers/reg_collection.rb
origen-0.6.10 lib/origen/registers/reg_collection.rb