Class: Envandle::Elements::GroupBlock
Defined Under Namespace
Classes: Dsl
Instance Method Summary
collapse
Methods included from AsContext
extended
#<<, #children, #children_by_type, #draw, #dsl, #gemfile, #groups_or_default, #parse_string_option, #parse_string_value, #send_to_bundler, #send_to_history
Constructor Details
Returns a new instance of GroupBlock.
12
13
14
15
|
# File 'lib/envandle/elements/group_block.rb', line 12
def initialize(*)
super
Envandle.arg! @loc, "No group names." if @args.args.empty?
end
|
Instance Method Details
#bundler_argsets ⇒ Object
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/envandle/elements/group_block.rb', line 25
def bundler_argsets
@bundler_argsets ||= [].tap do |a|
a << Argset.new(:group, *@args.args_and_options) do
receiver = gemfile.bundler_receiver
children.each do |child|
child.send_to_bundler receiver
end
end
end
end
|
#groups ⇒ Object
21
22
23
|
# File 'lib/envandle/elements/group_block.rb', line 21
def groups
@groups ||= @args.args.dup
end
|
#history_argsets ⇒ Object
36
37
38
39
40
41
42
43
44
|
# File 'lib/envandle/elements/group_block.rb', line 36
def history_argsets
@history_argsets ||= [].tap do |a|
a << Argset.new(:group, *@args.args_and_options) do |history|
children.each do |child|
child.send_to_history history
end
end
end
end
|
#type ⇒ Object
17
18
19
|
# File 'lib/envandle/elements/group_block.rb', line 17
def type
:group_block
end
|