Sha256: 48c491601ee69efbddb9642e890891782b6ddf426301e3d54893186ef3b4972c

Contents?: true

Size: 151 Bytes

Versions: 7

Compression:

Stored size: 151 Bytes

Contents

class String
  REPO_REGEX = /\/(.*).git$/
  def repo_dir
    self =~ REPO_REGEX ? $1 : self
  end

  def repo_url?
    !!(self =~ REPO_REGEX)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
duke-0.1.6 lib/ext/string.rb
duke-0.1.5 lib/ext/string.rb
duke-0.1.4 lib/ext/string.rb
duke-0.1.3 lib/ext/string.rb
duke-0.1.2 lib/ext/string.rb
duke-0.1.1 lib/ext/string.rb
duke-0.1.0 lib/ext/string.rb