Class: Juli::Macro::Amazon
- Inherits:
-
TemplateBase
- Object
- Base
- TemplateBase
- Juli::Macro::Amazon
- Defined in:
- lib/juli/macro/amazon.rb
Overview
generate Amazon link
Amazon link template can be defined at ‘amazon’ entry in JULI_REPO/.juli/config.
if it is not defined, then default template here is used.
Constant Summary collapse
- DEFAULT_TEMPLATE =
<<-EOS <iframe src="http://rcm-jp.amazon.co.jp/e/cm?t=wells00-22&o=9&p=8&l=as1&asins=%{asins}&ref=tf_til&fc1=000000&IS2=1<1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr" style="float:right; width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" ></iframe> EOS
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from TemplateBase
#conf_key, #run, #set_conf_default
Methods inherited from Base
#after_root, #initialize, #on_root, #run, #set_conf_default
Methods included from Util
#camelize, conf, find_template, in_filename, juli_repo, mkdir, out_filename, str_limit, str_trim, to_wikiname, underscore, usage, visitor, visitor_list
Constructor Details
This class inherits a constructor from Juli::Macro::Base
Class Method Details
.conf_template ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/juli/macro/amazon.rb', line 19 def self.conf_template <<EOM # Amazon association link with any ASIN can be rendered # at any location in juli text. Its template is as follows. # This HTML is just an example so that you can change as you like. # '%{asins}' in the template will be replaced by actual ASIN: # #amazon: '<iframe src="http://rcm-jp.amazon.co.jp/e/cm?o=9&p=8&l=as1&asins=%{asins}&ref=tf_til&fc1=000000&IS2=1<1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr" style="float:right; width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>' EOM end |
Instance Method Details
#place_holder ⇒ Object
30 |
# File 'lib/juli/macro/amazon.rb', line 30 def place_holder; 'asins'; end |