Sha256: e3b96d35903a3fac1fc5e8e71fcc258d26363f87c59006f5b376e808b5fc1d96

Contents?: true

Size: 511 Bytes

Versions: 4

Compression:

Stored size: 511 Bytes

Contents

module ArtiMark
  class Context
    class Result < Array
      def initialize
        super
      end

      def write_as_files(prefix, format='%03d')
        self.each_with_index {
          |converted, i|
            File.open("#{prefix}_#{format%(i+1)}.xhtml", 'w+') {
            |file|
            file << converted
          }
        }
      end 
      def write_as_single_file(filename)
        File.open(filename, 'w+') {
          |file|
          file << self[0]
        }
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
arti_mark-0.0.1.beta4 lib/arti_mark/result.rb
arti_mark-0.0.1.beta3 lib/arti_mark/result.rb
arti_mark-0.0.1.beta2 lib/arti_mark/result.rb
arti_mark-0.0.1.beta1 lib/arti_mark/result.rb