Class: Jekyll::PostFile

Inherits:
StaticFile
  • Object
show all
Defined in:
lib/jekyll-postfiles.rb

Instance Method Summary collapse

Constructor Details

#initialize(site, base, dir, name, dest) ⇒ PostFile

Initialize a new PostFile.

site - The Site. base - The String path to the <source>. dir - The String path of the source directory of the file (rel <source>). name - The String filename of the file.



17
18
19
20
21
# File 'lib/jekyll-postfiles.rb', line 17

def initialize(site, base, dir, name, dest)
  super(site, base, dir, name)
  @name = name
  @dest = dest
end

Instance Method Details

#destination(dest) ⇒ Object

Obtain destination path.

dest - The String path to the destination dir.

Returns destination file path.



28
29
30
# File 'lib/jekyll-postfiles.rb', line 28

def destination(dest)
  File.join(@dest, @name)
end