Class: Commands
Instance Method Summary collapse
- #info ⇒ Object
-
#initialize(directory = Dir.pwd) ⇒ Commands
constructor
A new instance of Commands.
Methods inherited from Hash
Constructor Details
#initialize(directory = Dir.pwd) ⇒ Commands
Returns a new instance of Commands.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/commands.rb', line 11 def initialize directory=Dir.pwd Dir.chdir(directory) do self[:pull]=Pull.new self[:update]=Update.new self[:setup]=Setup.new self[:build]=Build.new self[:test]=Test.new self[:analyze]=Analyze.new self[:doc]=Doc.new self[:publish]=Publish.new self[:add]=Add.new self[:commit]=Commit.new self[:push]=Push.new end end |
Instance Method Details
#info ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/commands.rb', line 27 def info puts "Commands" self.each{|k,v| v.update if v.respond_to? 'update' if v.length > 0 puts " #{k}" v.each{|c| puts " #{c}" if(!c.kind_of?(Hash)) } end } end |