Class: HDLRuby::Low::HashName

Inherits:
Hash
  • Object
show all
Defined in:
lib/HDLRuby/hruby_low.rb

Overview

Describes a hash for named HDLRuby objects

Instance Method Summary collapse

Methods inherited from Hash

#constant, #inner, #inout, #input, #output, #to_type, #typedef

Instance Method Details

#add(object) ⇒ Object

Adds a named +object+.



25
26
27
# File 'lib/HDLRuby/hruby_low.rb', line 25

def add(object)
    self[object.name] = object
end

#include?(object) ⇒ Boolean

Tells if +object+ is included in the hash.

Returns:

  • (Boolean)


30
31
32
# File 'lib/HDLRuby/hruby_low.rb', line 30

def include?(object)
    return self.has_key?(object.name)
end