Class: Envandle::Elements::Gem
Instance Method Summary
collapse
#<<, #children, #children_by_type, #draw, #dsl, #gemfile, #groups_or_default, #history_argsets, #parse_string_option, #parse_string_value, #send_to_bundler, #send_to_history
Constructor Details
#initialize ⇒ Gem
Returns a new instance of Gem.
4
5
6
7
|
# File 'lib/envandle/elements/gem.rb', line 4
def initialize(*)
super
@name = parse_string_value(@args.args[0].to_s, "gem name")
end
|
Instance Method Details
#bundler_argsets ⇒ Object
23
24
25
26
27
|
# File 'lib/envandle/elements/gem.rb', line 23
def bundler_argsets
@bundler_argsets ||= [].tap do |a|
a, {}
end
end
|
13
14
15
16
17
18
19
20
21
|
# File 'lib/envandle/elements/gem.rb', line 13
def (a, cache)
found = false
@args.contextual_groups.each do |group|
if gemfile.references.(@args, group, @name, a, cache)
found = true
end
end
a << Argset.new(:gem, *@args.args_and_options) unless found
end
|
#type ⇒ Object
9
10
11
|
# File 'lib/envandle/elements/gem.rb', line 9
def type
:gem
end
|