Class: LiquidAssets::PipelineTemplateEngine::TemplatePath
- Inherits:
-
Object
- Object
- LiquidAssets::PipelineTemplateEngine::TemplatePath
- Defined in:
- lib/liquid_assets/pipeline_template_engine.rb
Instance Attribute Summary collapse
-
#full_path ⇒ Object
Returns the value of attribute full_path.
-
#template_path ⇒ Object
Returns the value of attribute template_path.
Instance Method Summary collapse
-
#initialize(scope) ⇒ TemplatePath
constructor
A new instance of TemplatePath.
- #name ⇒ Object
- #relative_path ⇒ Object
Constructor Details
#initialize(scope) ⇒ TemplatePath
Returns a new instance of TemplatePath.
32 33 34 35 |
# File 'lib/liquid_assets/pipeline_template_engine.rb', line 32 def initialize(scope) self.template_path = scope.logical_path self.full_path = scope.pathname end |
Instance Attribute Details
#full_path ⇒ Object
Returns the value of attribute full_path.
30 31 32 |
# File 'lib/liquid_assets/pipeline_template_engine.rb', line 30 def full_path @full_path end |
#template_path ⇒ Object
Returns the value of attribute template_path.
42 43 44 |
# File 'lib/liquid_assets/pipeline_template_engine.rb', line 42 def template_path @template_path end |
Instance Method Details
#name ⇒ Object
37 38 39 |
# File 'lib/liquid_assets/pipeline_template_engine.rb', line 37 def name @name ||= relative_path end |
#relative_path ⇒ Object
44 45 46 |
# File 'lib/liquid_assets/pipeline_template_engine.rb', line 44 def relative_path @relative_path ||= template_path.sub(/^#{LiquidAssets::Config.path_prefix}\/(.*)$/i, '\1' ) end |