# # Copyright © 2013 # Nathan Currier # # Use, modification, and distribution are all subject to the # Boost Software License, Version 1.0. (See the accompanying # file LICENSE.md or at rideliner.tk/LICENSE.html). # # <description> #

module Bakery

module Ingredient
  module Ruby
    class ScriptFile < Bakery::Ingredient::ScriptFile
      def initialize filename, *args, &block
        super filename, 'ruby', *args do
          if args.include? :main
            puts 'if __FILE__ == $PROGRAM_NAME'
            puts ''
            puts 'end'
            puts ''
          end

          dispatch &block
        end
      end
    end
  end
end

end