Class: Preseason::Recipe::Bourbon

Inherits:
Preseason::Recipe show all
Defined in:
lib/preseason/recipe/bourbon.rb

Instance Attribute Summary

Attributes inherited from Preseason::Recipe

#config

Instance Method Summary collapse

Methods inherited from Preseason::Recipe

#initialize, #post_install_hook, #recipe_root

Methods included from Colorize

#ask, #readme, #yes?

Methods included from GeneratorContext

#method_missing

Constructor Details

This class inherits a constructor from Preseason::Recipe

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Preseason::GeneratorContext

Instance Method Details

#add_neatObject



13
14
15
16
17
# File 'lib/preseason/recipe/bourbon.rb', line 13

def add_neat
  insert_into_file 'app/assets/stylesheets/application.scss', after: "@import 'bourbon';\n" do
    "@import 'neat';\n"
  end
end

#configure_bourbonObject



7
8
9
10
11
# File 'lib/preseason/recipe/bourbon.rb', line 7

def configure_bourbon
  remove_file 'app/assets/stylesheets/application.css'
  create_file 'app/assets/stylesheets/application.scss'
  append_to_file 'app/assets/stylesheets/application.scss', "@import 'bourbon';\n"
end

#prepareObject



2
3
4
5
# File 'lib/preseason/recipe/bourbon.rb', line 2

def prepare
  configure_bourbon
  add_neat
end