Class: Google::UrlShortner::Client
- Inherits:
-
Object
- Object
- Google::UrlShortner::Client
- Defined in:
- lib/google_url_shortner.rb
Instance Attribute Summary collapse
-
#long_url ⇒ Object
readonly
Returns the value of attribute long_url.
-
#short_url ⇒ Object
readonly
Returns the value of attribute short_url.
Instance Method Summary collapse
-
#expand(url) ⇒ Object
Retrouve ou retourne l’url d’un site donné à partir du “short_url”.
-
#initialize ⇒ Client
constructor
Création d’un nouveau client.
-
#shorten(url) ⇒ Object
Crée la short url d’un site donné.
Constructor Details
#initialize ⇒ Client
Création d’un nouveau client.
34 35 36 |
# File 'lib/google_url_shortner.rb', line 34 def initialize @short_url = @long_url = nil end |
Instance Attribute Details
#long_url ⇒ Object (readonly)
Returns the value of attribute long_url.
32 33 34 |
# File 'lib/google_url_shortner.rb', line 32 def long_url @long_url end |
#short_url ⇒ Object (readonly)
Returns the value of attribute short_url.
32 33 34 |
# File 'lib/google_url_shortner.rb', line 32 def short_url @short_url end |