Class: Prebundler::Gemfile
- Inherits:
-
Object
- Object
- Prebundler::Gemfile
- Includes:
- Enumerable, TSort
- Defined in:
- lib/prebundler/gemfile.rb
Instance Attribute Summary collapse
-
#gems ⇒ Object
readonly
Returns the value of attribute gems.
Instance Method Summary collapse
- #each ⇒ Object (also: #each_pair)
-
#initialize(gems) ⇒ Gemfile
constructor
A new instance of Gemfile.
Constructor Details
#initialize(gems) ⇒ Gemfile
Returns a new instance of Gemfile.
10 11 12 13 14 15 16 |
# File 'lib/prebundler/gemfile.rb', line 10 def initialize(gems) @gems = gems gems.each do |_, gem_ref| assign_groups(gem_ref, []) end end |
Instance Attribute Details
#gems ⇒ Object (readonly)
Returns the value of attribute gems.
8 9 10 |
# File 'lib/prebundler/gemfile.rb', line 8 def gems @gems end |
Instance Method Details
#each ⇒ Object Also known as: each_pair
18 19 20 21 22 23 24 |
# File 'lib/prebundler/gemfile.rb', line 18 def each return to_enum(__method__) unless block_given? tsort_each do |name| yield name, gems[name] end end |