Class: GoogleImageApi::Url
- Inherits:
-
Object
- Object
- GoogleImageApi::Url
- Defined in:
- lib/google_image_api/url.rb
Instance Method Summary collapse
-
#initialize(uri) ⇒ Url
constructor
A new instance of Url.
- #title ⇒ Object
Constructor Details
#initialize(uri) ⇒ Url
Returns a new instance of Url.
3 4 5 |
# File 'lib/google_image_api/url.rb', line 3 def initialize(uri) @uri = uri end |
Instance Method Details
#title ⇒ Object
7 8 9 10 11 |
# File 'lib/google_image_api/url.rb', line 7 def title return @title if @title uri = URI.parse( @uri ) @title = URI.decode( uri.path.split('/').last ) end |