Class: TdlSpace::ExCreateTPSurge

Inherits:
Object
  • Object
show all
Defined in:
lib/tdl/exlib/test_point.rb

Instance Method Summary collapse

Constructor Details

#initialize(target: nil, descript: '', file: nil, line: nil) ⇒ ExCreateTPSurge

Returns a new instance of ExCreateTPSurge.



86
87
88
89
90
91
# File 'lib/tdl/exlib/test_point.rb', line 86

def initialize(target: nil, descript: '', file: nil, line: nil)
    @target = target
    @descript = descript
    @file = file 
    @line = line
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



97
98
99
100
101
102
# File 'lib/tdl/exlib/test_point.rb', line 97

def method_missing(method,*args,&block)
    if method.to_s !~ /[a-z]\w+/
        raise TdlError.new "Test point name<#{method}> is illegal"
    end
    self - method
end

Instance Method Details

#-(name) ⇒ Object



93
94
95
# File 'lib/tdl/exlib/test_point.rb', line 93

def -(name)
    TdlTestPoint.new(target: @target, name: name, descript: @descript, file: @file, line: @line)
end