Class: Shipit::Environment
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Shipit::Environment
- Defined in:
- lib/shipit/environment.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.find_or_create(repo, name) ⇒ Object
5 6 7 8 9 |
# File 'lib/shipit/environment.rb', line 5 def self.find_or_create(repo, name) env = self.find_by_name(name) || begin self.new(:repository => repo, :name => name).tap { |r| r.save } end end |
Instance Method Details
#command ⇒ Object
11 12 13 |
# File 'lib/shipit/environment.rb', line 11 def command self.repository.command.gsub /{{env}}/, self.name end |