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.
30 31 32 33 |
# File 'lib/liquid_assets/pipeline_template_engine.rb', line 30 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.
28 29 30 |
# File 'lib/liquid_assets/pipeline_template_engine.rb', line 28 def full_path @full_path end |
#template_path ⇒ Object
Returns the value of attribute template_path.
40 41 42 |
# File 'lib/liquid_assets/pipeline_template_engine.rb', line 40 def template_path @template_path end |
Instance Method Details
#name ⇒ Object
35 36 37 |
# File 'lib/liquid_assets/pipeline_template_engine.rb', line 35 def name @name ||= relative_path end |
#relative_path ⇒ Object
42 43 44 |
# File 'lib/liquid_assets/pipeline_template_engine.rb', line 42 def relative_path @relative_path ||= template_path.sub(/^#{LiquidAssets::Config.path_prefix}\/(.*)$/i, '\1' ) end |