Class: Moku::Command::Exec

Inherits:
Moku::Command show all
Defined in:
lib/moku/command/exec.rb

Overview

Run an arbitrary command

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(instance_name:, user:, cmd:, scope:) ⇒ Exec

Returns a new instance of Exec.


11
12
13
14
15
# File 'lib/moku/command/exec.rb', line 11

def initialize(instance_name:, user:, cmd:, scope:)
  super(instance_name: instance_name, user: user)
  @cmd = cmd
  @scope = scope
end

Instance Attribute Details

#cmdObject (readonly)

Returns the value of attribute cmd


17
18
19
# File 'lib/moku/command/exec.rb', line 17

def cmd
  @cmd
end

#scopeObject (readonly)

Returns the value of attribute scope


17
18
19
# File 'lib/moku/command/exec.rb', line 17

def scope
  @scope
end

Instance Method Details

#actionObject


19
20
21
# File 'lib/moku/command/exec.rb', line 19

def action
  :exec
end

#signatureObject


23
24
25
# File 'lib/moku/command/exec.rb', line 23

def signature
  instance.releases.first.signature
end