Class: MavenRemote
- Inherits:
-
Object
- Object
- MavenRemote
- Defined in:
- lib/j/repos.rb
Instance Method Summary collapse
- #get(coordinates) ⇒ Object
-
#initialize(url) ⇒ MavenRemote
constructor
A new instance of MavenRemote.
Constructor Details
#initialize(url) ⇒ MavenRemote
Returns a new instance of MavenRemote.
78 79 80 |
# File 'lib/j/repos.rb', line 78 def initialize(url) @url = url end |
Instance Method Details
#get(coordinates) ⇒ Object
82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/j/repos.rb', line 82 def get(coordinates) uri = URI(@url + "/" + coordinates.relative_url) response = HTTParty.get(uri) if response.code != 200 raise "Error getting #{uri} response code #{response.code}" end response.body end |