Class: Houcho::CLI::OuterRole
- Inherits:
-
Thor
- Object
- Thor
- Houcho::CLI::OuterRole
- Defined in:
- lib/houcho/cli/outerrole.rb
Constant Summary collapse
Instance Method Summary collapse
- #attach(*args) ⇒ Object
- #detach(*args) ⇒ Object
- #details(*args) ⇒ Object
- #list ⇒ Object
- #load ⇒ Object
Instance Method Details
#attach(*args) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/houcho/cli/outerrole.rb', line 21 def attach(*args) Houcho::CLI::Main.empty_args(self, shell, __method__) if args.empty? @@or.attach(args, [:roles]) rescue RoleExistenceException, SpecFileException, SQLite3::ConstraintException => e puts e. exit! end |
#detach(*args) ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/houcho/cli/outerrole.rb', line 32 def detach(*args) Houcho::CLI::Main.empty_args(self, shell, __method__) if args.empty? @@or.detach(args, [:roles]) rescue RoleExistenceException, SQLite3::ConstraintException => e puts e. exit! end |
#details(*args) ⇒ Object
42 43 44 45 |
# File 'lib/houcho/cli/outerrole.rb', line 42 def details(*args) Houcho::CLI::Main.empty_args(self, shell, __method__) if args.empty? Houcho::CLI::Main.puts_details(@@or.details(args)) end |
#list ⇒ Object
14 15 16 |
# File 'lib/houcho/cli/outerrole.rb', line 14 def list puts @@or.list.sort.join("\n") end |