Class: Middleman::Sprockets::ImportedAsset
- Inherits:
-
Object
- Object
- Middleman::Sprockets::ImportedAsset
- Defined in:
- lib/middleman-sprockets/imported_asset.rb
Overview
ImportedAsset
Instance Attribute Summary collapse
-
#logical_path ⇒ Object
readonly
Returns the value of attribute logical_path.
-
#output_path ⇒ Object
readonly
Returns the value of attribute output_path.
Instance Method Summary collapse
-
#initialize(logical_path, output_path = nil) ⇒ ImportedAsset
constructor
Create instance.
Constructor Details
#initialize(logical_path, output_path = nil) ⇒ ImportedAsset
Create instance
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/middleman-sprockets/imported_asset.rb', line 15 def initialize logical_path, output_path = nil @logical_path = Pathname.new logical_path if output_path.respond_to? :call if output_path.arity.abs == 1 output_path = output_path.call(@logical_path) else output_path = output_path.call end end @output_path = Pathname.new output_path if output_path end |
Instance Attribute Details
#logical_path ⇒ Object (readonly)
Returns the value of attribute logical_path.
6 7 8 |
# File 'lib/middleman-sprockets/imported_asset.rb', line 6 def logical_path @logical_path end |
#output_path ⇒ Object (readonly)
Returns the value of attribute output_path.
6 7 8 |
# File 'lib/middleman-sprockets/imported_asset.rb', line 6 def output_path @output_path end |