Class: Project

Inherits:
ActiveResource::Base
  • Object
show all
Defined in:
lib/cap_ext_webistrano/project.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.configure(config) ⇒ Object



4
5
6
7
8
# File 'lib/cap_ext_webistrano/project.rb', line 4

def self.configure(config)
  Project.site = config[:webistrano_home]
  Project.user = config[:user]
  Project.password = config[:password]
end

.find_by_name(name) ⇒ Object



10
11
12
# File 'lib/cap_ext_webistrano/project.rb', line 10

def self.find_by_name(name)
  project = find(:all).find {|project| project.name == name}
end

Instance Method Details

#find_stage(name) ⇒ Object



14
15
16
# File 'lib/cap_ext_webistrano/project.rb', line 14

def find_stage(name)
  Stage.find(:all, :params => {:project_id => id}).find {|stage| stage.name == name}
end