Class: Elesai::Action::Show
- Inherits:
-
Object
- Object
- Elesai::Action::Show
- Defined in:
- lib/elesai/action/show.rb
Constant Summary collapse
- COMPONENTS =
%w(adapter virtualdrive vd physicaldrive pd bbu)
Instance Method Summary collapse
- #exec ⇒ Object
-
#initialize(arguments, options) ⇒ Show
constructor
A new instance of Show.
Constructor Details
#initialize(arguments, options) ⇒ Show
Returns a new instance of Show.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/elesai/action/show.rb', line 7 def initialize(arguments,) @options = @arguments = arguments @component = nil opts = OptionParser.new opts. = "Usage: #{ID} [options] show <component>" opts.separator "" opts.separator " <component> is adapter, physicaldisk|pd, virtualdisk|vd, bbu" opts.order!(@arguments) arguments_valid? process_arguments @show = { :adapter => self.method(:show_adapter), :virtualdrive => self.method(:show_virtualdrive), :physicaldrive => self.method(:show_physicaldrive), :bbu => self.method(:show_bbu) } end |