class ForemanAdmin::ExternalCommand

Public Class Methods

external_invocation(invocation = nil) click to toggle source

The base command that will be executed externally. Think of this as ARGV of what we're running externally.

# File lib/foreman_admin/external_command.rb, line 6
def self.external_invocation(invocation = nil)
  @external_invocation = invocation if invocation
  @external_invocation
end

Public Instance Methods

execute() click to toggle source
# File lib/foreman_admin/external_command.rb, line 21
def execute
  puts `#{external_command}`
end
external_command() click to toggle source

The exact assembled command that will be executed externally. Override this in a child class if you want it have logic.

# File lib/foreman_admin/external_command.rb, line 17
def external_command
  "#{external_invocation}"
end
external_invocation() click to toggle source
# File lib/foreman_admin/external_command.rb, line 11
def external_invocation
  self.class.external_invocation
end