Class: CabezaDeTermo::AssetsPublisher::Configuration
- Inherits:
-
Object
- Object
- CabezaDeTermo::AssetsPublisher::Configuration
- Defined in:
- lib/cabeza-de-termo/assets-publisher/configuration/configuration.rb
Overview
The Publisher configuration.
Instance Method Summary collapse
-
#add_timestamps_to_published_assets(boolean) ⇒ Object
Set if the Publisher will add a timestamp to the assets with relative paths.
-
#add_timestamps_to_published_assets? ⇒ Boolean
Answer if the Publisher will add a timestamp to the assets with relative paths.
- #command_line_compiler(&block) ⇒ Object
- #destination_folder(folder) ⇒ Object
- #destination_path ⇒ Object
-
#initialize ⇒ Configuration
constructor
Initialize the instance.
- #javascripts_compiler(&block) ⇒ Object
- #published_assets_subfolder ⇒ Object
- #rendering_scope_assets_collector ⇒ Object
-
#source_folders ⇒ Object
Answer the asset sources collection.
- #stylesheets_compiler(&block) ⇒ Object
- #use_rendering_scope_assets_collector(rendering_scope_assets_collector) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Initialize the instance
6 7 8 9 10 11 12 13 14 |
# File 'lib/cabeza-de-termo/assets-publisher/configuration/configuration.rb', line 6 def initialize @source_folders = [] destination_folder nil true stylesheets_compiler {} javascripts_compiler {} use_rendering_scope_assets_collector nil end |
Instance Method Details
#add_timestamps_to_published_assets(boolean) ⇒ Object
Set if the Publisher will add a timestamp to the assets with relative paths
22 23 24 |
# File 'lib/cabeza-de-termo/assets-publisher/configuration/configuration.rb', line 22 def (boolean) = boolean end |
#add_timestamps_to_published_assets? ⇒ Boolean
Answer if the Publisher will add a timestamp to the assets with relative paths
17 18 19 |
# File 'lib/cabeza-de-termo/assets-publisher/configuration/configuration.rb', line 17 def end |
#command_line_compiler(&block) ⇒ Object
53 54 55 |
# File 'lib/cabeza-de-termo/assets-publisher/configuration/configuration.rb', line 53 def command_line_compiler(&block) CommandLineCompiler.new(&block) end |
#destination_folder(folder) ⇒ Object
31 32 33 |
# File 'lib/cabeza-de-termo/assets-publisher/configuration/configuration.rb', line 31 def destination_folder(folder) @destination_folder = folder end |
#destination_path ⇒ Object
35 36 37 |
# File 'lib/cabeza-de-termo/assets-publisher/configuration/configuration.rb', line 35 def destination_path ::Pathname.new(@destination_folder) end |
#javascripts_compiler(&block) ⇒ Object
48 49 50 51 |
# File 'lib/cabeza-de-termo/assets-publisher/configuration/configuration.rb', line 48 def javascripts_compiler(&block) return @javascripts_compiler_block.call if block.nil? @javascripts_compiler_block = block end |
#published_assets_subfolder ⇒ Object
39 40 41 |
# File 'lib/cabeza-de-termo/assets-publisher/configuration/configuration.rb', line 39 def published_assets_subfolder ::Pathname.new('assets') end |
#rendering_scope_assets_collector ⇒ Object
61 62 63 |
# File 'lib/cabeza-de-termo/assets-publisher/configuration/configuration.rb', line 61 def rendering_scope_assets_collector() @rendering_scope_assets_collector end |
#source_folders ⇒ Object
Answer the asset sources collection
27 28 29 |
# File 'lib/cabeza-de-termo/assets-publisher/configuration/configuration.rb', line 27 def source_folders @source_folders end |
#stylesheets_compiler(&block) ⇒ Object
43 44 45 46 |
# File 'lib/cabeza-de-termo/assets-publisher/configuration/configuration.rb', line 43 def stylesheets_compiler(&block) return @stylesheets_compiler_block.call if block.nil? @stylesheets_compiler_block = block end |
#use_rendering_scope_assets_collector(rendering_scope_assets_collector) ⇒ Object
57 58 59 |
# File 'lib/cabeza-de-termo/assets-publisher/configuration/configuration.rb', line 57 def use_rendering_scope_assets_collector(rendering_scope_assets_collector) @rendering_scope_assets_collector = rendering_scope_assets_collector end |