Class: PGit::Command::Show
- Inherits:
-
Object
- Object
- PGit::Command::Show
- Extended by:
- Forwardable
- Defined in:
- lib/pgit/command/show.rb
Instance Method Summary collapse
- #execute! ⇒ Object
-
#initialize(app) ⇒ Show
constructor
A new instance of Show.
- #search ⇒ Object
Constructor Details
permalink #initialize(app) ⇒ Show
Returns a new instance of Show.
11 12 13 |
# File 'lib/pgit/command/show.rb', line 11 def initialize(app) @app = app end |
Instance Method Details
permalink #execute! ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/pgit/command/show.rb', line 15 def execute! = "No commands are listed for this project. Run `pgit cmd add --help` for more info." raise PGit::Error::User, if commands.empty? if search.empty? show_all_of_current_project else show_one end end |
permalink #search ⇒ Object
[View source]
26 27 28 |
# File 'lib/pgit/command/show.rb', line 26 def search args.first || [] end |