Class: Brut::CLI::Apps::BuildAssets::All
Instance Attribute Summary
#parent_command
Instance Method Summary
collapse
#accepts, #args_description, #argv, #commands, #default_command, #default_command_class, #env, #env_vars, #name, #options, #opts, #puts, #run, #stderr, #stdin, #stdout, #system!
Constructor Details
#initialize ⇒ All
Returns a new instance of All.
26
27
28
29
30
31
32
|
# File 'lib/brut/cli/apps/build_assets.rb', line 26
def initialize
super([
Images.new,
Css.new,
Js.new,
])
end
|
Instance Method Details
#bootstrap? ⇒ Boolean
24
|
# File 'lib/brut/cli/apps/build_assets.rb', line 24
def bootstrap? = false
|
#default_rack_env ⇒ Object
22
|
# File 'lib/brut/cli/apps/build_assets.rb', line 22
def default_rack_env = "development"
|
#description ⇒ Object
23
|
# File 'lib/brut/cli/apps/build_assets.rb', line 23
def description = "Build all assets"
|
#execute(execution_context) ⇒ Object
34
35
36
37
38
39
40
41
|
# File 'lib/brut/cli/apps/build_assets.rb', line 34
def execute(execution_context)
if execution_context.options.clean?(default: execution_context.options.env != "production")
asset_metadata_file = Brut.container.asset_metadata_file
execution_context.stdout.puts "Removing #{asset_metadata_file}"
FileUtils.rm_f(asset_metadata_file)
end
super
end
|