Sha256: 637a64b8065229a0be9d0d224518ab7e07b97cb3883ad1a007d262646d1de7ee

Contents?: true

Size: 500 Bytes

Versions: 1

Compression:

Stored size: 500 Bytes

Contents

module MyChart
  module Dsl
    module Output

      attr_reader :output_files

      def output *files_and_tmpl
        tmpl, files = extract_tmpl_file_address files_and_tmpl
        @output_files ||= []
        files.each do |f|
          @output_files << [f, tmpl]
        end
      end

      private

      def extract_tmpl_file_address args
        if args[-1].kind_of? Hash
          [args.pop[:tmpl], args]
        else
          [DEFAULT_TMPL, args]
        end
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
my_chart-0.1.3 lib/my_chart/dsl/output.rb