Bones::App::Info

Public Class Methods

initialize_info() click to toggle source
   # File lib/bones/app/info.rb, line 5
5:   def self.initialize_info
6:     synopsis 'bones info'
7:     summary 'show information about available skeletons'
8:     description 'Shows information about available skeletons.'
9:   end

Public Instance Methods

run() click to toggle source
    # File lib/bones/app/info.rb, line 11
11:   def run
12:     skeleton_dir = File.join(mrbones_dir, DEFAULT_SKELETON)
13:     skeleton_dir = ::Bones.path(DEFAULT_SKELETON) unless test(dd, skeleton_dir)
14: 
15:     msg  = "\n"
16:     msg << "The default project skeleton will be copied from:\n"
17:     msg << "    " << skeleton_dir << "\n\n"
18: 
19:     fmt = "    %-12s => %s\n"
20:     msg << "Available projects skeletons are:\n"
21:     Dir.glob(File.join(mrbones_dir, '*')).sort.each do |fn|
22:       next if fn =~ /\.archive$/
23:       next if File.basename(fn) == DEFAULT_SKELETON
24: 
25:       if test(ff, fn)
26:         msg << fmt % [File.basename(fn), File.read(fn).strip]
27:       else
28:         msg << "    " << File.basename(fn) << "\n"
29:       end
30:     end
31: 
32:     stdout.puts msg
33:     stdout.puts
34:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.