module RD
  class RD2RWikiVisitor
    AMAZON = 'ilikeruby-22'
    def ref_ext_Amazon(label, content)
      return nil unless /^amazon:([a-zA-Z0-9]+)$/ =~ label
      asin = $1
      url = "http://www.amazon.co.jp/exec/obidos/ASIN/#{asin}/#{AMAZON}"
      url_ref_ext(url, 'amazon')
    end
  end
end

