Class: PrLog::Command

Inherits:
Struct
  • Object
show all
Includes:
Events::Emitter
Defined in:
lib/pr_log/command.rb

Overview

Event emitting command base class

Direct Known Subclasses

FetchCommand

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configObject

Returns the value of attribute config

Returns:

  • (Object)

    the current value of config



5
6
7
# File 'lib/pr_log/command.rb', line 5

def config
  @config
end

Class Method Details

.perform(options) {|command| ... } ⇒ Object

Yields:

  • (command)


8
9
10
11
12
# File 'lib/pr_log/command.rb', line 8

def self.perform(options)
  command = new(Configuration.setup(options))
  yield(command) if block_given?
  command.perform
end

Instance Method Details

#performObject



14
15
16
# File 'lib/pr_log/command.rb', line 14

def perform
  fail(NotImplementedError)
end