Sha256: b6390bd4013ae1818f9af90b5d3ac9058aa9717a344469a84cbce63dc70a23c7

Contents?: true

Size: 727 Bytes

Versions: 6

Compression:

Stored size: 727 Bytes

Contents

module Jekyll

  class StaticFile
    # Initialize a new StaticFile.
    #   +site+ is the Site
    #   +base+ is the String path to the <source>
    #   +dir+ is the String path between <source> and the file
    #   +name+ is the String filename of the file
    #
    # Returns <StaticFile>
    def initialize(site, base, dir, name)
      @site = site
      @base = base
      @dir  = dir
      @name = name
    end

    # Write the static file to the destination directory.
    #   +dest+ is the String path to the destination dir
    #
    # Returns nothing
    def write(dest)
      FileUtils.mkdir_p(File.join(dest, @dir))
      FileUtils.cp(File.join(@base, @dir, @name), File.join(dest, @dir, @name))
    end
  end

end

Version data entries

6 entries across 6 versions & 4 rubygems

Version Path
blackwinter-jekyll-0.5.7 lib/jekyll/static_file.rb
jberkel-jekyll-0.5.7 lib/jekyll/static_file.rb
nirvdrum-jekyll-0.7.0 lib/jekyll/static_file.rb
jekyll-0.5.7 lib/jekyll/static_file.rb
jekyll-0.5.6 lib/jekyll/static_file.rb
jekyll-0.5.5 lib/jekyll/static_file.rb