Method: CollinsShell::Console::Asset#power!

Defined in:
lib/collins_shell/console/asset.rb

#power!(action = nil) ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'lib/collins_shell/console/asset.rb', line 10

def power! action = nil
  Collins::Option(action).map do |action|
    action = Collins::Power.normalize_action(action)
    verifying_response("power #{action}") {
      @asset_client.power!(action)
    }
  end.get_or_else {
    cput("A power action argument is required. power <action>")
  }
end