Class: Commands
Instance Attribute Summary collapse
-
#env ⇒ Object
Returns the value of attribute env.
Instance Method Summary collapse
- #info ⇒ Object
-
#initialize(env = nil, directory = Rake.application.original_dir) ⇒ Commands
constructor
A new instance of Commands.
Methods inherited from Hash
Constructor Details
#initialize(env = nil, directory = Rake.application.original_dir) ⇒ Commands
Returns a new instance of Commands.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/commands.rb', line 13 def initialize env=nil,directory=Rake.application.original_dir @env=env @env=Environment.new() if @env.nil? 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 Attribute Details
#env ⇒ Object
Returns the value of attribute env.
12 13 14 |
# File 'lib/commands.rb', line 12 def env @env end |
Instance Method Details
#info ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/commands.rb', line 31 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 |