Class: Posgra::DSL::Roles::Group

Inherits:
Object
  • Object
show all
Includes:
Logger::Helper, TemplateHelper, Utils::Helper
Defined in:
lib/posgra/dsl/roles/group.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utils::Helper

#matched?

Methods included from TemplateHelper

#context, #include_template

Methods included from Logger::Helper

#log

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, options, &block)
  @group = group
  @options = options
  @context = context.merge(:group => group)
  @result = []
  instance_eval(&block) if block
end

Instance Attribute Details

#resultObject (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