Class: Googl::Base

Inherits:
Object show all
Defined in:
lib/googl/base.rb

Direct Known Subclasses

Expand, Shorten

Instance Method Summary collapse

Instance Method Details

#infoObject

URL for analytics

url = Googl.shorten('http://goo.gl/ump4S')
ur.info
=> http://goo.gl/ump4S.info


25
26
27
# File 'lib/googl/base.rb', line 25

def info
  "#{short_url}.info"
end

#qr_codeObject

URL for QR Code

url = Googl.shorten('http://goo.gl/ump4S')
ur.qr_code
=> http://goo.gl/ump4S.qr

Usage:

<img src="http://goo.gl/ump4S.qr" />


15
16
17
# File 'lib/googl/base.rb', line 15

def qr_code
  "#{short_url}.qr"
end