Module: HDLRuby::Low::ForceName

Included in:
Block, Scope, SystemT
Defined in:
lib/HDLRuby/hruby_low_without_namespace.rb

Overview

Module allowing to force a name to a HDLRuby::Low object.

Instance Method Summary collapse

Instance Method Details

#extend_name!(obj) ⇒ Object

Extends the name of object +obj+ with current's one.



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

def extend_name!(obj)
    obj.set_name!((self.name.to_s + "::" + obj.name.to_s).to_sym)
end

#force_name!Object

Sets a name if there is no name.



20
21
22
# File 'lib/HDLRuby/hruby_low_without_namespace.rb', line 20

def force_name!
    @name = HDLRuby.uniq_name if self.name.empty?
end