Class: Bashly::Commands::Generate

Inherits:
Base
  • Object
show all
Defined in:
lib/bashly/commands/generate.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#config, #config_validator, #validate_config, #with_valid_config

Methods included from AssetHelper

#asset, #asset_content

Instance Attribute Details

#watchingObject (readonly)

Returns the value of attribute watching.



27
28
29
# File 'lib/bashly/commands/generate.rb', line 27

def watching
  @watching
end

Instance Method Details

#runObject



29
30
31
32
33
34
35
# File 'lib/bashly/commands/generate.rb', line 29

def run
  Settings.env = args['--env'] if args['--env']
  @watching = args['--watch']

  generate
  watch if watching
end