class Qrcode::Waze::Code2Map
Public Class Methods
new(address, size = 6, filename = 'qrcode.png')
click to toggle source
# File lib/qrcode/waze.rb, line 9 def initialize(address, size = 6, filename = 'qrcode.png') @address = address @filename = filename @size = size end
Public Instance Methods
create_googlemaps()
click to toggle source
# File lib/qrcode/waze.rb, line 19 def create_googlemaps RQRCode::QRCode.new("http://maps.google.com/maps?f=d&daddr=#{@address.gsub!(' ','+')}&directionsmode=transit").as_png(:module_size => @size).save(@filename) if !@address.nil? and !@filename.nil? and !@size.nil? end
create_waze()
click to toggle source
# File lib/qrcode/waze.rb, line 15 def create_waze RQRCode::QRCode.new("http://waze.to/?q=#{@address.gsub!(' ','%20')}&navigate=yes").as_png(:module_size => @size).save(@filename) if !@address.nil? and !@filename.nil? and !@size.nil? end