Class: Brut::CLI::Apps::BuildAssets::All

Inherits:
Commands::CompoundCommand show all
Defined in:
lib/brut/cli/apps/build_assets.rb

Instance Attribute Summary

Attributes inherited from Commands::BaseCommand

#parent_command

Instance Method Summary collapse

Methods inherited from Commands::BaseCommand

#accepts, #args_description, #argv, #commands, #default_command, #default_command_class, #env, #env_vars, #name, #options, #opts, #puts, #run, #stderr, #stdin, #stdout, #system!

Constructor Details

#initializeAll

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

Returns:

  • (Boolean)


24
# File 'lib/brut/cli/apps/build_assets.rb', line 24

def bootstrap? = false

#default_rack_envObject



22
# File 'lib/brut/cli/apps/build_assets.rb', line 22

def default_rack_env = "development"

#descriptionObject



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")
     = Brut.container.
    execution_context.stdout.puts "Removing #{}"
    FileUtils.rm_f()
  end
  super
end