Class: Vendorise::Parser
- Inherits:
-
Object
- Object
- Vendorise::Parser
- Defined in:
- lib/vendorise/parser.rb
Instance Attribute Summary collapse
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #gem_name ⇒ Object
- #gem_url ⇒ Object
-
#initialize(url) ⇒ Parser
constructor
A new instance of Parser.
Constructor Details
#initialize(url) ⇒ Parser
Returns a new instance of Parser.
5 6 7 |
# File 'lib/vendorise/parser.rb', line 5 def initialize(url) @url = url end |
Instance Attribute Details
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/vendorise/parser.rb', line 3 def url @url end |
Instance Method Details
#gem_name ⇒ Object
13 14 15 |
# File 'lib/vendorise/parser.rb', line 13 def gem_name File.basename url, ".git" end |
#gem_url ⇒ Object
9 10 11 |
# File 'lib/vendorise/parser.rb', line 9 def gem_url url =~ /^\s+$/ ? nil : url end |