class R::TargetHelp
Public Class Methods
new(t)
click to toggle source
Calls superclass method
C::TargetTag::new
# File lib/rub/help.rb, line 55 def initialize(t) super t.to_sym register end
Public Instance Methods
build()
click to toggle source
# File lib/rub/help.rb, line 83 def build gen_help end
gen_help()
click to toggle source
# File lib/rub/help.rb, line 31 def gen_help @@tag and return @@tag = Set.new @@bld = Set.new @@ins = Set.new @@src = Set.new R.targets.each do |p, t| if p.is_a? Symbol @@tag << [p, t] elsif p.to_s.start_with?(R::Env.out_dir.to_s) @@bld << [p, t] elsif ( p.to_s.start_with?(D[:prefix].to_s+'/') || !p.to_s.start_with?(R::Env.src_dir.to_s) ) @@ins << [p, t] else @@src << [p, t] end end end
print_target(ta)
click to toggle source
# File lib/rub/help.rb, line 61 def print_target(ta) p, t = ta ps = if p.is_a? Symbol #p.inspect ":#{p}" else p.to_s end if t.description printf " %-20s - %s\n", ps, t.description else printf " %s\n", ps end end
print_targets(tm)
click to toggle source
# File lib/rub/help.rb, line 77 def print_targets(tm) tm.each do |t| print_target t end end