Skip to content

Commit

Permalink
Add builder.
Browse files Browse the repository at this point in the history
  • Loading branch information
louismullie committed Jan 4, 2013
1 parent ebf8a16 commit cbca3d8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/treat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ module Treat
require_relative 'treat/exception'
require_relative 'treat/autoload'
require_relative 'treat/modules'
require_relative 'treat/builder'

end
7 changes: 7 additions & 0 deletions lib/treat/builder.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class Treat::Builder
def initialize(&block)
i = 'include Treat::Core::DSL'
eval(i, block.binding)
block.call
end
end

0 comments on commit cbca3d8

Please sign in to comment.