Method: Spork::GemHelpers::GemPath#initialize
- Defined in:
- lib/spork/gem_helpers.rb
#initialize(p) ⇒ GemPath
Returns a new instance of GemPath.
7 8 9 10 11 |
# File 'lib/spork/gem_helpers.rb', line 7 def initialize(p) @path = p @name, @version = File.basename(p).scan(/^(.+?)-([^-]+)$/).flatten @version_numbers = @version.split(/[^0-9]+/).map(&:to_i) end |