Class: Pandler::CLI
- Inherits:
-
Thor
- Object
- Thor
- Pandler::CLI
- Defined in:
- lib/pandler/cli.rb
Instance Method Summary collapse
- #clean ⇒ Object
- #exec(*cmd) ⇒ Object
-
#initialize(args = [], options = {}, config = {}) ⇒ CLI
constructor
A new instance of CLI.
- #install ⇒ Object
- #list ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize(args = [], options = {}, config = {}) ⇒ CLI
Returns a new instance of CLI.
7 8 9 10 11 |
# File 'lib/pandler/cli.rb', line 7 def initialize(args=[], ={}, config={}) super @chroot = Pandler::Chroot.new @yumrepo = Pandler::Yumrepo.new end |
Instance Method Details
#clean ⇒ Object
32 33 34 |
# File 'lib/pandler/cli.rb', line 32 def clean @chroot.clean end |
#exec(*cmd) ⇒ Object
37 38 39 |
# File 'lib/pandler/cli.rb', line 37 def exec(*cmd) @chroot.execute(*cmd) end |
#install ⇒ Object
20 21 22 23 24 |
# File 'lib/pandler/cli.rb', line 20 def install @chroot.init @yumrepo.createrepo @chroot.install(*@yumrepo.install_pkgs) end |
#list ⇒ Object
27 28 29 |
# File 'lib/pandler/cli.rb', line 27 def list puts @chroot.list end |
#version ⇒ Object
15 16 17 |
# File 'lib/pandler/cli.rb', line 15 def version puts Pandler::VERSION end |