Class: Sparrowhawk::GemMapper
- Inherits:
-
Object
- Object
- Sparrowhawk::GemMapper
- Includes:
- Enumerable
- Defined in:
- lib/sparrowhawk/gem_mapper.rb
Instance Attribute Summary collapse
-
#gems ⇒ Object
readonly
Returns the value of attribute gems.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(gems) ⇒ GemMapper
constructor
A new instance of GemMapper.
Constructor Details
#initialize(gems) ⇒ GemMapper
Returns a new instance of GemMapper.
8 9 10 |
# File 'lib/sparrowhawk/gem_mapper.rb', line 8 def initialize gems @gems = gems end |
Instance Attribute Details
#gems ⇒ Object (readonly)
Returns the value of attribute gems.
6 7 8 |
# File 'lib/sparrowhawk/gem_mapper.rb', line 6 def gems @gems end |
Instance Method Details
#each ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/sparrowhawk/gem_mapper.rb', line 12 def each gems.each do |gem| spec = gem.spec yield spec_entry spec.spec_name, spec.to_ruby gem.file_entries.each do |file_entry| yield gem_file_entry spec.full_name, file_entry[0]["path"], file_entry[1] end end end |