Class: Posgra::DSL::Roles::Group
- Inherits:
-
Object
- Object
- Posgra::DSL::Roles::Group
- Includes:
- Logger::Helper, TemplateHelper, Utils::Helper
- Defined in:
- lib/posgra/dsl/roles/group.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(context, group, options, &block) ⇒ Group
constructor
A new instance of Group.
- #user(name) ⇒ Object
Methods included from Utils::Helper
Methods included from TemplateHelper
Methods included from Logger::Helper
Constructor Details
#initialize(context, group, options, &block) ⇒ Group
Returns a new instance of Group.
8 9 10 11 12 13 14 |
# File 'lib/posgra/dsl/roles/group.rb', line 8 def initialize(context, group, , &block) @group = group @options = @context = context.merge(:group => group) @result = [] instance_eval(&block) if block end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
6 7 8 |
# File 'lib/posgra/dsl/roles/group.rb', line 6 def result @result end |
Instance Method Details
#user(name) ⇒ Object
16 17 18 19 |
# File 'lib/posgra/dsl/roles/group.rb', line 16 def user(name) name = name.to_s @result << name end |