Class: Trekky
- Inherits:
-
Object
- Object
- Trekky
- Defined in:
- lib/trekky.rb,
lib/trekky/source.rb,
lib/trekky/context.rb,
lib/trekky/haml_source.rb,
lib/trekky/sass_source.rb,
lib/trekky/static_source.rb
Defined Under Namespace
Classes: Context, HamlSource, SassSource, Source, StaticSource
Instance Method Summary collapse
-
#initialize(source_dir) ⇒ Trekky
constructor
A new instance of Trekky.
- #render_to(target_dir) ⇒ Object
Constructor Details
Instance Method Details
#render_to(target_dir) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/trekky.rb', line 10 def render_to(target_dir) @context.sources.each do |source| path = target_path(target_dir, source) output = source.render output = source.render_errors unless source.valid? STDOUT.puts "Writing #{source.path} to #{path}" write(output, path) end end |