Class: Dljbz::Base

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

Direct Known Subclasses

Shorten

Instance Method Summary collapse

Instance Method Details

#infoObject

URL for analytics

url = Dljbz.shorten('http://51qiangda.com')
ur.info
=> http://dlj.bz/51qd.info


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

def info
  "#{short_url}.info"
end

#qr_codeObject

URL for QR Code

url = Dljbz.shorten('http://51qiangda.com')
ur.qr_code
=> http://dlj.bz/51qd.qr

Usage:

<img src="http://dlj.bz/51qd.qr" />


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

def qr_code
  "#{short_url}.qr"
end