Skip to content

Commit

Permalink
Added some documentation for the frameworks
Browse files Browse the repository at this point in the history
  • Loading branch information
judofyr committed Jul 3, 2009
1 parent edaec0f commit 0b3d533
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/parkaby/frameworks/camping.rb
@@ -1,5 +1,14 @@
Parkaby.load('parse_tree', 'ParseTree')

# == Using it
#
# module Blog
# include Parkaby::Frameworks::Camping
#
# def self.create
# Views.compile!
# end
# end
module Parkaby::Frameworks::Camping
class Processor < SexpProcessor
def initialize(*a)
Expand Down
5 changes: 5 additions & 0 deletions lib/parkaby/frameworks/rails.rb
@@ -1,3 +1,8 @@
# == Using it
#
# # in config/initializers/parkaby.rb
# require 'parkaby'
# Parkaby::Frameworks::Rails.active!
class Parkaby::Frameworks::Rails < ActionView::TemplateHandler
@@cache = {}

Expand Down
22 changes: 22 additions & 0 deletions lib/parkaby/frameworks/sinatra.rb
@@ -1,3 +1,25 @@
# == Using it
#
# # if you're using Sinatra::Base
# Parkaby::Frameworks::Sinatra.activate!
#
# # if you're using your own class
# class MyApp < Sinatra::Base
# include Parkaby::Frameworks::Sinatra
# end
#
# # in your code
#
# get '/' do
# parkaby do
# h1 'Chunky Bacon'
# end
# end
#
# get '/template' do
# # works with inline and external templates
# parkaby :template
# end
module Parkaby::Frameworks::Sinatra
def self.activate!
::Sinatra::Base.instance_eval do
Expand Down

0 comments on commit 0b3d533

Please sign in to comment.