Class: SdlInstSimplePortSugar

Inherits:
Object
  • Object
show all
Defined in:
lib/tdl/sdlmodule/sdlmodule_instance.rb

Direct Known Subclasses

SdlInstPortSugar

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sdl_inst) ⇒ SdlInstSimplePortSugar

Returns a new instance of SdlInstSimplePortSugar.



394
395
396
397
# File 'lib/tdl/sdlmodule/sdlmodule_instance.rb', line 394

def initialize(sdl_inst)
    @sdl_inst = sdl_inst

end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_id, *argvs, &block) ⇒ Object



406
407
408
409
410
411
412
# File 'lib/tdl/sdlmodule/sdlmodule_instance.rb', line 406

def method_missing(method_id,*argvs,&block)
    # if @sdl_inst.respond_to? method_id
        @sdl_inst.send(method_id,*argvs,&block)
        # else  
    #     raise TdlError.new("#{@sdl_inst.origin.module_name} dont have port #{method_id}")
    # end
end

Instance Attribute Details

#sdl_instObject (readonly)

Returns the value of attribute sdl_inst.



393
394
395
# File 'lib/tdl/sdlmodule/sdlmodule_instance.rb', line 393

def sdl_inst
  @sdl_inst
end

Instance Method Details

#[](*args) ⇒ Object Also known as: logic, wire



399
400
401
# File 'lib/tdl/sdlmodule/sdlmodule_instance.rb', line 399

def [](*args)
    return self
end