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, #delegate_to_command, #detailed_description, #env, #env_vars, #name, #options, #opts, #puts, #run, #stdin, #system!, #theme

Constructor Details

#initializeAll

Returns a new instance of All.



48
49
50
51
52
53
54
# File 'lib/brut/cli/apps/build_assets.rb', line 48

def initialize
  super([
    Images.new,
    Css.new,
    Js.new,
  ])
end

Instance Method Details

#bootstrap?Boolean

Returns:

  • (Boolean)


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

def bootstrap? = false

#default_rack_envObject



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

def default_rack_env = "development"

#descriptionObject



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

def description = "Build all assets"

#execute(execution_context) ⇒ Object



56
57
58
59
60
61
62
63
# File 'lib/brut/cli/apps/build_assets.rb', line 56

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