Class: Upgrade
- Inherits:
-
Array
- Object
- Array
- Upgrade
- Defined in:
- lib/upgrade.rb
Instance Method Summary collapse
- #add(command) ⇒ Object
-
#initialize ⇒ Upgrade
constructor
A new instance of Upgrade.
Constructor Details
#initialize ⇒ Upgrade
Returns a new instance of Upgrade.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/upgrade.rb', line 5 def initialize if(Environment.scm=='git' && Environment.branch=='develop') Dir.glob('dep/**/*.dll').each {|f| src=Environment.dev_root + "/" + f if(File.exist?(src) && File.mtime(src) > File.mtime(f)) self.add "<%FileUtils.cp('#{src}','#{f}')%>" end } end end |
Instance Method Details
#add(command) ⇒ Object
16 17 18 |
# File 'lib/upgrade.rb', line 16 def add command self << command if(!include?(command)) end |