Class: Approvals::Executable

Inherits:
Object
  • Object
show all
Defined in:
lib/approvals/executable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command, &block) ⇒ Executable

Returns a new instance of Executable


5
6
7
8
# File 'lib/approvals/executable.rb', line 5

def initialize(command, &block)
  self.command = command
  self.on_failure = block
end

Instance Attribute Details

#commandObject

Returns the value of attribute command


4
5
6
# File 'lib/approvals/executable.rb', line 4

def command
  @command
end

#on_failureObject

Returns the value of attribute on_failure


4
5
6
# File 'lib/approvals/executable.rb', line 4

def on_failure
  @on_failure
end

Instance Method Details

#inspectObject


14
15
16
# File 'lib/approvals/executable.rb', line 14

def inspect
  command
end

#to_sObject


10
11
12
# File 'lib/approvals/executable.rb', line 10

def to_s
  inspect
end