Sha256: 5b774dbf6307d17c6a03bdd364016576c5e2de8edd9610ac1b2f807b881d4f25
Contents?: true
Size: 647 Bytes
Versions: 1
Compression:
Stored size: 647 Bytes
Contents
module Chapter11 module Generators class BeginGenerator < Rails::Generators::Base source_root File.expand_path("../templates", __FILE__) def generate_instructions require 'rdiscount' instr_md = File.expand_path('../instructions.md',self.class.source_root) return unless File.exists?(instr_md) dest = File.join(Rails.root,'doc','chapter10.html') copy_file(instr_md, dest, :force => true) do |content| RDiscount.new(content).to_html end say_status('Note',"Now open file://#{dest} in your web browser for instructions", :cyan) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tft_rails-0.6.0 | lib/generators/chapter11/begin/begin_generator.rb |