Class: OsCtl::Image::Cli::Command

Inherits:
Lib::Cli::Command
  • Object
show all
Defined in:
lib/osctl/image/cli/command.rb

Direct Known Subclasses

Containers, Image

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(global_opts, opts, args) ⇒ Command

Returns a new instance of Command.



12
13
14
15
# File 'lib/osctl/image/cli/command.rb', line 12

def initialize(global_opts, opts, args)
  super
  OsCtl::Lib::Logger.setup(:stdout)
end

Class Method Details

.run(klass, method) ⇒ Object



5
6
7
8
9
10
# File 'lib/osctl/image/cli/command.rb', line 5

def self.run(klass, method)
  proc do |global_opts, opts, args|
    cmd = klass.new(global_opts, opts, args)
    cmd.method(method).call
  end
end