class Octopress::Ink::StaticFile

Public Class Methods

new(source, dest) click to toggle source
# File lib/octopress-ink/jekyll/static_file.rb, line 4
def initialize(source, dest)
  @source = source
  @dest = dest
end

Public Instance Methods

destination(dest) click to toggle source
# File lib/octopress-ink/jekyll/static_file.rb, line 9
def destination(dest)
  File.join(dest, @dest)
end
path() click to toggle source
# File lib/octopress-ink/jekyll/static_file.rb, line 13
def path
  @source
end
write(dest) click to toggle source
# File lib/octopress-ink/jekyll/static_file.rb, line 17
def write(dest)
  dest_path = destination(dest)

  FileUtils.mkdir_p(File.dirname(dest_path))
  FileUtils.cp(@source, dest_path)

  true
end