Class: Houcho::CLI::Host
- Inherits:
-
Thor
- Object
- Thor
- Houcho::CLI::Host
- Defined in:
- lib/houcho/cli/host.rb
Constant Summary collapse
Instance Method Summary collapse
Instance Method Details
#attach(*args) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/houcho/cli/host.rb', line 19 def attach(*args) Houcho::CLI::Main.empty_args(self, shell, __method__) if args.empty? @@h.attach(args, [:roles]) rescue RoleExistenceException, SpecFileException, SQLite3::ConstraintException => e puts e. exit! end |
#detach(*args) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/houcho/cli/host.rb', line 30 def detach(*args) Houcho::CLI::Main.empty_args(self, shell, __method__) if args.empty? @@h.detach(args, [:roles]) rescue RoleExistenceException, SQLite3::ConstraintException => e puts e. exit! end |
#details(*args) ⇒ Object
40 41 42 43 |
# File 'lib/houcho/cli/host.rb', line 40 def details(*args) Houcho::CLI::Main.empty_args(self, shell, __method__) if args.empty? Houcho::CLI::Main.puts_details(@@h.details(args)) end |
#list ⇒ Object
12 13 14 |
# File 'lib/houcho/cli/host.rb', line 12 def list puts @@h.list.sort.join("\n") end |