Class: Webgen::ContentProcessor::Sass::NodeTreeImporter
- Inherits:
-
Sass::Importers::Base
- Object
- Sass::Importers::Base
- Webgen::ContentProcessor::Sass::NodeTreeImporter
- Defined in:
- lib/webgen/content_processor/sass.rb
Overview
Custom importer for Sass to load files by resolving them in the node tree.
Instance Method Summary collapse
- #find(name, options) ⇒ Object
- #find_relative(name, base, options) ⇒ Object
-
#initialize(context) ⇒ NodeTreeImporter
constructor
Creates a new importer that imports files from the node tree relative to the given node alcn.
-
#key(name, options) ⇒ Object
:nodoc:.
-
#marshal_dump ⇒ Object
:nodoc:.
-
#marshal_load(data) ⇒ Object
:nodoc:.
-
#mtime(name, options) ⇒ Object
:nodoc:.
-
#to_s ⇒ Object
:nodoc:.
Constructor Details
#initialize(context) ⇒ NodeTreeImporter
Creates a new importer that imports files from the node tree relative to the given node alcn.
33 34 35 |
# File 'lib/webgen/content_processor/sass.rb', line 33 def initialize(context) @context = context end |
Instance Method Details
#find(name, options) ⇒ Object
49 50 51 |
# File 'lib/webgen/content_processor/sass.rb', line 49 def find(name, ) _find(@context.ref_node.alcn, name, ) end |
#find_relative(name, base, options) ⇒ Object
44 45 46 |
# File 'lib/webgen/content_processor/sass.rb', line 44 def find_relative(name, base, ) _find(base, name, ) end |
#key(name, options) ⇒ Object
:nodoc:
58 59 60 |
# File 'lib/webgen/content_processor/sass.rb', line 58 def key(name, ) #:nodoc: ["webgen:", name] end |
#marshal_dump ⇒ Object
:nodoc:
37 38 |
# File 'lib/webgen/content_processor/sass.rb', line 37 def marshal_dump #:nodoc: end |
#marshal_load(data) ⇒ Object
:nodoc:
40 41 |
# File 'lib/webgen/content_processor/sass.rb', line 40 def marshal_load(data) #:nodoc: end |
#mtime(name, options) ⇒ Object
:nodoc:
53 54 55 56 |
# File 'lib/webgen/content_processor/sass.rb', line 53 def mtime(name, ) #:nodoc: node = resolve_node(@context.ref_node.alcn, name) node['modified_at'] if node end |
#to_s ⇒ Object
:nodoc:
62 63 64 |
# File 'lib/webgen/content_processor/sass.rb', line 62 def to_s #:nodoc: "webgen: #{@context.ref_node.alcn}" end |