Sha256: 7f7c871ceec72d6d5b2223fbf3465b2ca84976e2ae257146a2a9fc98e181221f

Contents?: true

Size: 859 Bytes

Versions: 4

Compression:

Stored size: 859 Bytes

Contents

# encoding: utf-8

require 'haml'

module NanocFuel::Helpers
   module Facebook
     def fb_init(app_id)
       template = File.read(File.expand_path("../templates/facebook/fb_init.haml", __FILE__))
       Haml::Engine.new(template).render(Object.new, :app_id => app_id)
     end
     
     def fb_comments(url, num_posts, width)
       template = File.read(File.expand_path("../templates/facebook/fb_comments.haml", __FILE__))
       Haml::Engine.new(template).render(Object.new, :url => url, :num_posts => num_posts, :width => width)
     end
     
     def fb_like_btn(layout, width, show_faces, send)
       template = File.read(File.expand_path("../templates/facebook/fb_like_btn.haml", __FILE__))
       Haml::Engine.new(template).render(Object.new, :layout => layout, :width => width, :show_faces => show_faces, :send => send)
     end
     
   end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
nanoc-fuel-0.0.5 lib/nanoc-fuel/helpers/facebook.rb
nanoc_fuel-0.0.4 lib/nanoc_fuel/helpers/facebook.rb
nanoc_fuel-0.0.3 lib/nanoc_fuel/helpers/facebook.rb
nanoc_fuel-0.0.2 lib/nanoc_fuel/helpers/facebook.rb