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



10
11
12
# File 'lib/pups/command.rb', line 10

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

.run(command, params) ⇒ Object



3
4
5
6
7
8
# File 'lib/pups/command.rb', line 3

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

Instance Method Details

#interpolate_params(cmd) ⇒ Object



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

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