Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/ext/string.rb
Constant Summary collapse
- REPO_REGEX =
/\/(.*).git$/
Instance Method Summary collapse
Instance Method Details
#repo_dir ⇒ Object
3 4 5 |
# File 'lib/ext/string.rb', line 3 def repo_dir self =~ REPO_REGEX ? $1 : self end |
#repo_url? ⇒ Boolean
7 8 9 |
# File 'lib/ext/string.rb', line 7 def repo_url? !!(self =~ REPO_REGEX) end |