Class: Jekyll::SourceMapPage

Inherits:
Page
  • Object
show all
Defined in:
lib/jekyll/source_map_page.rb

Overview

A Jekyll::Page subclass to manage the source map file associated with a given scss / sass page.

Instance Method Summary collapse

Constructor Details

#initialize(css_page) ⇒ SourceMapPage

Initialize a new SourceMapPage.

Parameters:

  • css_page (Jekyll::Page)

    The Page object that manages the css file.



10
11
12
13
14
15
16
17
18
# File 'lib/jekyll/source_map_page.rb', line 10

def initialize(css_page)
  @site = css_page.site
  @dir  = css_page.dir
  @data = css_page.data
  @name = css_page.basename + ".css.map"

  process(@name)
  Jekyll::Hooks.trigger :pages, :post_init, self
end

Instance Method Details

#asset_file?Boolean

Returns:

  • (Boolean)


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

def asset_file?
  true
end

#extObject



24
25
26
# File 'lib/jekyll/source_map_page.rb', line 24

def ext
  ".map"
end

#inspectObject

@return the object as a debug String.



37
38
39
# File 'lib/jekyll/source_map_page.rb', line 37

def inspect
  "#<#{self.class} @name=#{name.inspect}>"
end

#render_with_liquid?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/jekyll/source_map_page.rb', line 32

def render_with_liquid?
  false
end

#source_map(map) ⇒ Object



20
21
22
# File 'lib/jekyll/source_map_page.rb', line 20

def source_map(map)
  self.content = map
end