| Class | Uttk::Streams::Stream |
| In: |
lib/uttk/streams/Stream.rb
|
| Parent: | Object |
| my | [RW] | Attributes |
| name | [RW] | Attributes |
| ref | [RW] | Attributes |
Constructor
# File lib/uttk/streams/Stream.rb, line 24 def initialize ( name, ref=nil ) @name, @my, @ref = name.to_s, TempPath.new(name), ref end
# File lib/uttk/streams/Stream.rb, line 60 def clean if @my.is_a? Pathname @my.unlink if @my.exist? and @my.temp? end if @ref.is_a? Pathname @ref.unlink if @ref.exist? and @ref.temp? elsif @ref.is_a? File ref = Pathname.new(@ref.path) ref.unlink if ref.exist? and ref.temp? end end
Methods
# File lib/uttk/streams/Stream.rb, line 33 def compare_streams return @cmp if defined? @cmp @cmp = @ref.compare_stream(@my) @status = @cmp ? :PASS : :FAILED @cmp end
# File lib/uttk/streams/Stream.rb, line 45 def to_uttk_log ( log ) unless @name == 'input' str = @my.to_s_for_uttk_log unless str.nil? or (str.is_a? String and str.empty?) log["my_#@name"] = str end end unless @ref.nil? str = @ref.to_s_for_uttk_log unless str.nil? or (str.is_a? String and str.empty?) log["ref_#@name"] = str end end end