Sha256: 4fcb54975e308a581db18c0bae1b51c995a361f1ae67ea532db268bc38ec2e39

Contents?: true

Size: 626 Bytes

Versions: 5

Compression:

Stored size: 626 Bytes

Contents

module CassetteRack
  module Cli
    class << self
      def draw(dest_path)
        tree = CassetteRack::Tree.create(CassetteRack::Configure.source_path)
        tree.each do |entry|
          if entry.leaf?
            drawer = CassetteRack::Drawer.new(entry.id)
            if drawer.exist?
              path = File.join(dest_path, entry.id)
              File.open(path + '.md', 'w') do |file|
                file.puts drawer.pull
              end
            end
          else
            path = File.join(dest_path, entry.id)
            FileUtils.mkdir_p(path)
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cassette-rack-0.10.0 lib/cassette-rack/cli.rb
cassette-rack-0.9.0 lib/cassette-rack/cli.rb
cassette-rack-0.8.1 lib/cassette-rack/cli.rb
cassette-rack-0.8.0 lib/cassette-rack/cli.rb
cassette-rack-0.7.0 lib/cassette-rack/cli.rb