Class: Middleman::Presentation::AssetComponent
- Defined in:
- lib/middleman-presentation-core/asset_component.rb
Overview
A asset component
It represents a asset component. A asset component can contain JavaScript-files, stylesheets, images, fonts, … . A asset component knows where to get a the files from in filesystem, which version of the component is required and which JavaScript-files and stylesheets should be includes in “javascripts/application.js” and “stylesheets”application.scss“.
Instance Attribute Summary collapse
-
#base_path ⇒ Object
readonly
Returns the value of attribute base_path.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Attributes inherited from Component
#ignorable_files, #importable_files, #loadable_files, #name, #output_paths, #resource_locator, #version
Instance Method Summary collapse
-
#initialize(path:, base_path: path, name: path, **args) ⇒ AssetComponent
constructor
An asset component.
- #root_directory ⇒ Object
- #root_directory= ⇒ Object
Methods inherited from Component
Constructor Details
#initialize(path:, base_path: path, name: path, **args) ⇒ AssetComponent
An asset component
21 22 23 24 25 26 27 |
# File 'lib/middleman-presentation-core/asset_component.rb', line 21 def initialize(path:, base_path: path, name: path, **args) super(**args) @path = Pathname.new(path) @name = name @base_path = Pathname.new(base_path) end |
Instance Attribute Details
#base_path ⇒ Object (readonly)
Returns the value of attribute base_path.
13 14 15 |
# File 'lib/middleman-presentation-core/asset_component.rb', line 13 def base_path @base_path end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
13 14 15 |
# File 'lib/middleman-presentation-core/asset_component.rb', line 13 def path @path end |
Instance Method Details
#root_directory ⇒ Object
29 |
# File 'lib/middleman-presentation-core/asset_component.rb', line 29 def root_directory; end |
#root_directory= ⇒ Object
31 |
# File 'lib/middleman-presentation-core/asset_component.rb', line 31 def root_directory=(*); end |