Sha256: 187774882bf23bc16e533992496c3b14f988ba213a8b34c33dbf9d0962c4efea

Contents?: true

Size: 212 Bytes

Versions: 22

Compression:

Stored size: 212 Bytes

Contents

require 'tempfile'

module Dandelion
  module Utils
    def temp(file, data)
      tmp = Tempfile.new(file.gsub('/', '.'))
      tmp << data
      tmp.flush
      yield(tmp.path)
      tmp.close
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
dandelion-0.6.0 lib/dandelion/utils.rb
dandelion-0.5.4 lib/dandelion/utils.rb
dandelion-0.5.3 lib/dandelion/utils.rb
dandelion-0.5.2 lib/dandelion/utils.rb
dandelion-0.5.1 lib/dandelion/utils.rb
dandelion-0.5.0 lib/dandelion/utils.rb
dandelion-0.4.17 lib/dandelion/utils.rb
dandelion-0.4.16 lib/dandelion/utils.rb
dandelion-0.4.15 lib/dandelion/utils.rb
dandelion-0.4.14 lib/dandelion/utils.rb
dandelion-0.4.10 lib/dandelion/utils.rb
dandelion-0.4.9 lib/dandelion/utils.rb
dandelion-0.4.8 lib/dandelion/utils.rb
dandelion-0.4.7 lib/dandelion/utils.rb
dandelion-0.4.6 lib/dandelion/utils.rb
dandelion-0.4.5 lib/dandelion/utils.rb
dandelion-0.4.4 lib/dandelion/utils.rb
dandelion-0.4.3 lib/dandelion/utils.rb
dandelion-0.4.2 lib/dandelion/utils.rb
dandelion-0.4.1 lib/dandelion/utils.rb