Class: Capistrano::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/capistrano-ec2_role_tag.rb

Class Method Summary collapse

Class Method Details

.ec2_by_role(role) ⇒ Object



17
18
19
20
21
22
# File 'lib/capistrano-ec2_role_tag.rb', line 17

def ec2_by_role(role)
  if Capistrano::Ec2RoleTag.provider.nil?
    Capistrano::Ec2RoleTag.configure { |configure| configure.stage = fetch(:stage) }
  end
  Capistrano::Ec2RoleTag.provider.fetch(role)
end