Class: InfPort

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sdlmodule, infclass) ⇒ InfPort

Returns a new instance of InfPort.



4
5
6
7
# File 'lib/tdl/sdlmodule/sdlmodule_port_define.rb', line 4

def initialize(sdlmodule,infclass)
    @infclass = infclass
    @sdlmodule = sdlmodule
end

Instance Attribute Details

#infclassObject

Returns the value of attribute infclass.



3
4
5
# File 'lib/tdl/sdlmodule/sdlmodule_port_define.rb', line 3

def infclass
  @infclass
end

#sdlmoduleObject

Returns the value of attribute sdlmodule.



3
4
5
# File 'lib/tdl/sdlmodule/sdlmodule_port_define.rb', line 3

def sdlmodule
  @sdlmodule
end

Instance Method Details

#port_name_chk(name) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/tdl/sdlmodule/sdlmodule_port_define.rb', line 9

def port_name_chk(name)
    if name.is_a?( String )|| name.is_a?( Symbol)
        return
    else
        raise TdlError.new("Port of #{@sdlmodule.module_name} Type<#{@infclass.to_s}> must be defined in String or Symbol")
    end
end