Class: Object

Inherits:
BasicObject
Defined in:
lib/uttk/streams.rb,
lib/uttk/streams/Diff.rb,
lib/uttk/loaders/Loader.rb,
lib/uttk/logger/to_uttk_log.rb,
lib/uttk/strategies/Iterate.rb

Overview

module Uttk

Instance Method Summary collapse

Instance Method Details

#can_diff?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/uttk/streams/Diff.rb', line 31

def can_diff?
  true
end

#compare_stream(stream) ⇒ Object



15
16
17
# File 'lib/uttk/streams.rb', line 15

def compare_stream ( stream )
  to_s.compare_stream(stream)
end

#to_diff_for_uttk_log(my) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/uttk/streams/Diff.rb', line 24

def to_diff_for_uttk_log ( my )
  IO.popen("diff -u --label my #{my} --label ref -", 'r+') do |diff|
    diff << to_s
    diff.close_write
    diff.readlines.join
  end
end

#to_s_for_uttk_logObject



18
19
20
# File 'lib/uttk/streams.rb', line 18

def to_s_for_uttk_log
  self
end

#to_uttk_log(log) ⇒ Object



23
24
25
# File 'lib/uttk/logger/to_uttk_log.rb', line 23

def to_uttk_log ( log )
  log.new_leaf(self)
end

#to_uttk_log_with_key(key, log) ⇒ Object



27
28
29
30
31
# File 'lib/uttk/logger/to_uttk_log.rb', line 27

def to_uttk_log_with_key ( key, log )
  log.new_node key do
    log << self
  end
end

#uttk_each(*a, &b) ⇒ Object



126
127
128
# File 'lib/uttk/strategies/Iterate.rb', line 126

def uttk_each ( *a, &b )
  each(*a, &b)
end

#uttk_testify(symtbl = nil, &block) ⇒ Object



65
66
67
68
# File 'lib/uttk/loaders/Loader.rb', line 65

def uttk_testify ( symtbl=nil, &block )
  symtbl = Uttk.default_symtbl if symtbl.nil?
  testify(symtbl.new_child, &block)
end