Class: CapUtil::ServerRoles::RoleDef
- Inherits:
-
Object
- Object
- CapUtil::ServerRoles::RoleDef
- Defined in:
- lib/cap-util/server_roles.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#servers ⇒ Object
readonly
Returns the value of attribute servers.
Instance Method Summary collapse
- #apply(&block) ⇒ Object
-
#initialize(name, servers_hash) ⇒ RoleDef
constructor
A new instance of RoleDef.
Constructor Details
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
43 44 45 |
# File 'lib/cap-util/server_roles.rb', line 43 def name @name end |
#servers ⇒ Object (readonly)
Returns the value of attribute servers.
43 44 45 |
# File 'lib/cap-util/server_roles.rb', line 43 def servers @servers end |
Instance Method Details
#apply(&block) ⇒ Object
52 53 54 55 56 |
# File 'lib/cap-util/server_roles.rb', line 52 def apply(&block) @servers.each do |server| block.call @name, server.hostname, server. end end |