Class: Push
- Inherits:
-
Array
- Object
- Array
- Push
- Defined in:
- lib/push.rb
Instance Method Summary collapse
- #add(command) ⇒ Object
-
#initialize ⇒ Push
constructor
A new instance of Push.
- #update ⇒ Object
Constructor Details
#initialize ⇒ Push
Returns a new instance of Push.
5 6 7 |
# File 'lib/push.rb', line 5 def initialize update end |
Instance Method Details
#add(command) ⇒ Object
15 16 17 |
# File 'lib/push.rb', line 15 def add command self << command if(!include?(command)) end |
#update ⇒ Object
9 10 11 12 13 |
# File 'lib/push.rb', line 9 def update if(Environment.scm=='git') self.add "<%`git push 2>&1`%>" end end |