Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 7d98e0c779
Fetching contributors…

Cannot retrieve contributors at this time

42 lines (34 sloc) 0.836 kb
# Represents a Loops command.
class Loops::Command
# @return [Engine]
# The instance of {Engine} to execute command in.
attr_reader :engine
# @return [Hash<String, Object>]
# The hash of (parsed) command-line options.
attr_reader :options
# Initializes a new {Command} instance.
def initialize
end
# Invoke a command.
#
# Initiaizes {#engine} and {#options} variables and
# executes a command.
#
def invoke(engine, options)
@engine = engine
@options = options
execute
end
# A command entry point. Should be overridden in descendants.
#
def execute
raise 'Generic command has no actions'
end
# Gets a value indicating whether command needs to bootstrap framework.
def requires_bootstrap?
true
end
end
# All Loops command registered.
module Loops::Commands
end
Jump to Line
Something went wrong with that request. Please try again.