Class: Juli::Visitor::Html::Helper::FbLike
- Inherits:
-
AbstractHelper
- Object
- AbstractHelper
- Juli::Visitor::Html::Helper::FbLike
- Defined in:
- lib/juli/visitor/html/helper/fb_like.rb
Overview
Helper-class for ‘fb_like’ helper
Constant Summary collapse
- DEFAULT_TEMPLATE =
default HTML template for facebook ‘like’ button. You can customize it in .juli/config facebook.like.template entry.
%href in the template will be replaced to the actual URL of current wiki page.
'<fb:like href="%{href}" ' + 'send="false" layout="button_count" width="450" ' + 'show_faces="false">' + '</fb:like>'
Instance Method Summary collapse
-
#initialize ⇒ FbLike
constructor
A new instance of FbLike.
-
#on_root(in_file, root, visitor = nil) ⇒ Object
called on each parsed document.
- #run(*args) ⇒ Object
Methods inherited from AbstractHelper
conf_template, #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
#initialize ⇒ FbLike
Returns a new instance of FbLike.
15 16 17 |
# File 'lib/juli/visitor/html/helper/fb_like.rb', line 15 def initialize @fb_conf = conf['facebook'] end |
Instance Method Details
#on_root(in_file, root, visitor = nil) ⇒ Object
called on each parsed document
20 21 22 |
# File 'lib/juli/visitor/html/helper/fb_like.rb', line 20 def on_root(in_file, root, visitor = nil) @in_file = in_file end |