Method: Jekyll::StaticFile#initialize
- Defined in:
- lib/jekyll/static_file.rb
#initialize(site, base, dir, name, collection = nil) ⇒ StaticFile
Initialize a new StaticFile.
site - The Site. base - The String path to the <source>. dir - The String path between <source> and the file. name - The String filename of the file. rubocop: disable Metrics/ParameterLists
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/jekyll/static_file.rb', line 31 def initialize(site, base, dir, name, collection = nil) @site = site @base = base @dir = dir @name = name @collection = collection @relative_path = File.join(*[@dir, @name].compact) @extname = File.extname(@name) @type = @collection&.label&.to_sym end |