Class: Dugway::Cli::Validate

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/dugway/cli/validate.rb

Instance Method Summary collapse

Instance Method Details

#validateObject



16
17
18
19
20
21
22
23
# File 'lib/dugway/cli/validate.rb', line 16

def validate
  unless theme.valid?(validate_colors: !options['skip-color-validation'], validate_layout_attributes: !options['skip-layout-attribute-validation'])
    theme.errors.each { |error| say(error, :red) }
    say("\nTheme is invalid", :red)
    exit(1)
  end
  say("Theme is valid!", :green)
end