1 autoload :Pathname, 'pathname'
6 syms.flatten.each do |sym|
7 class_eval "def #{sym}(&block);block.call(@#{sym}) if block_given?;@#{sym};end"
14 def relative_path_from(dir)
15 Pathname.new(File.expand_path(self)).relative_path_from(Pathname.new(File.expand_path(dir))).to_s
19 relative_path_from(Dir.pwd)
23 def _pp(cmd, src, tgt=nil, options={})
24 return if Rake.verbose
27 template = options[:indent] ? "%#{width*options[:indent]}s %s %s" : "%-#{width}s %s %s"
28 puts template % [cmd, src, tgt ? "-> #{tgt}" : nil]