Class: PackerFiles::CLI::OS
- Inherits:
-
Thor
- Object
- Thor
- PackerFiles::CLI::OS
- Defined in:
- lib/PackerFiles/CLI/OS.rb
Instance Method Summary collapse
Instance Method Details
#init ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/PackerFiles/CLI/OS.rb', line 32 def init klass = Finder.new.class_name([:name]) if (File.exist?([:file]) && ![:force]) $stderr.puts "Cannot overwrite #{options[:file]} w/o --force" return 1 end DocGenerator.new(klass, [:file]).Generate end |
#list ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/PackerFiles/CLI/OS.rb', line 13 def list Finder.new.class_names.each do |cl| name = cl.name.gsub('PackerFiles::','') if cl.versions.empty? versions = 'Any' else versions = cl.versions.to_s end puts "#{name} => #{versions}" end end |