Method: Jekyll::PaginateV2::Generator::Utils.ensure_leading_dot

Defined in:
lib/jekyll-paginate-v2/generator/utils.rb

.ensure_leading_dot(path) ⇒ Object

Static: Return a String version of the input which has a leading dot.

If the input already has a dot in position zero, it will be
returned unchanged.

path - a String path

Returns the path with a leading slash



43
44
45
# File 'lib/jekyll-paginate-v2/generator/utils.rb', line 43

def self.ensure_leading_dot(path)
  path[0..0] == "." ? path : ".#{path}"
end