Class: Pups::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/pups/command.rb

Direct Known Subclasses

ExecCommand, FileCommand, MergeCommand, ReplaceCommand

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.interpolate_params(cmd, params) ⇒ Object



12
13
14
# File 'lib/pups/command.rb', line 12

def self.interpolate_params(cmd, params)
  Pups::Config.interpolate_params(cmd, params)
end

.run(command, params) ⇒ Object



5
6
7
8
9
10
# File 'lib/pups/command.rb', line 5

def self.run(command, params)
  case command
  when String then from_str(command, params).run
  when Hash then from_hash(command, params).run
  end
end

Instance Method Details

#interpolate_params(cmd) ⇒ Object



16
17
18
# File 'lib/pups/command.rb', line 16

def interpolate_params(cmd)
  Pups::Command.interpolate_params(cmd, @params)
end