Class: PGit::Command::Run

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/pgit/command/run.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Run

Returns a new instance of Run.



9
10
11
# File 'lib/pgit/command/run.rb', line 9

def initialize(app)
  @app = app
end

Instance Method Details

#execute!Object

Raises:



13
14
15
16
17
18
# File 'lib/pgit/command/run.rb', line 13

def execute!
  error_message = "Command '#{search}' does not exist. Run 'pgit cmd show' to see the available custom commands."
  raise PGit::Error::User, error_message unless command

  command.execute
end