Method: Bulldog::Stream::Base#write_to

Defined in:
lib/bulldog/stream.rb

#write_to(path) ⇒ Object

Write the content to the given path.



84
85
86
87
88
89
90
# File 'lib/bulldog/stream.rb', line 84

def write_to(path)
  src, dst = self.path, path
  unless src == dst
    FileUtils.mkdir_p File.dirname(path)
    FileUtils.cp src, dst
  end
end