Class: Pathname

Inherits:
Object show all
Defined in:
lib/ttk/symtbl.rb,
lib/ttk/dumpers/Yaml.rb,
lib/ttk/loaders/Loader.rb,
lib/ttk/strategies/Streams.rb,
lib/ttk/strategies/Streams/Diff.rb

Instance Method Summary collapse

Instance Method Details

#compare_stream(stream) ⇒ Object



54
55
56
# File 'lib/ttk/strategies/Streams.rb', line 54

def compare_stream ( stream )
  read.compare_stream(stream)
end

#old_to_yamlObject



40
# File 'lib/ttk/dumpers/Yaml.rb', line 40

alias_method :old_to_yaml, :to_yaml

#symtbl_gsub(symtbl) ⇒ Object



89
90
91
92
# File 'lib/ttk/symtbl.rb', line 89

def symtbl_gsub ( symtbl )
  res = to_s.symtbl_gsub(symtbl)
  return self.class.new(res) unless res.nil?
end

#testify(opts = {}, &block) ⇒ Object



66
67
68
69
70
# File 'lib/ttk/loaders/Loader.rb', line 66

def testify ( opts={}, &block )
  strategy = open { |f| f.testify(opts, &block) }
  strategy.symtbl[:pwd] = self.expand_path.dirname
  strategy
end

#to_diff_for_ttk_log(my) ⇒ Object



49
50
51
# File 'lib/ttk/strategies/Streams/Diff.rb', line 49

def to_diff_for_ttk_log ( my )
  open.to_diff_for_ttk_log(my)
end

#to_s_for_ttk_logObject



57
58
59
# File 'lib/ttk/strategies/Streams.rb', line 57

def to_s_for_ttk_log
  read
end

#to_yaml(opts = {}) ⇒ Object



41
42
43
44
45
46
47
# File 'lib/ttk/dumpers/Yaml.rb', line 41

def to_yaml ( opts={} )
  if opts[:ttk]
    self.to_s.to_yaml(opts)
  else
    old_to_yaml(opts)
  end
end