Class: SimpleTemplater::Builder
- Inherits:
-
Object
- Object
- SimpleTemplater::Builder
- Defined in:
- lib/simple-templater/builder.rb
Overview
Direct Known Subclasses
Instance Attribute Summary collapse
Class Method Summary collapse
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize(content_dir, context = Hash.new) ⇒ Builder
constructor
A new instance of Builder.
Constructor Details
Instance Attribute Details
#context ⇒ Object
28 29 30 |
# File 'lib/simple-templater/builder.rb', line 28 def context @context end |
Class Method Details
.create(*args) ⇒ Object
22 23 24 25 26 |
# File 'lib/simple-templater/builder.rb', line 22 def self.create(*args) templater = self.new(*args) puts "Context: #{templater.context.inspect}" templater.create end |
Instance Method Details
#create ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/simple-templater/builder.rb', line 33 def create Find.find(@content_dir) do |template| file = self.(template) next if template == @content_dir proceed(template, file) end end |