class RogerScsslint::Generator

Lint configuration retriever

Constants

CONFIG_PATH
DEFAULT_CONFIG_URL

Public Instance Methods

write_config_file() click to toggle source

Write config file

# File lib/roger_scsslint/generator.rb, line 38
def write_config_file
  if options[:config]
    config = open(options[:config]).read
  else
    config = open(DEFAULT_CONFIG_URL).read
  end

  # Create file check if we don't have a conflict or something
  create_file "#{@project.path}/#{CONFIG_PATH}", config, force: options[:force]
end