Class: HackCardsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- HackCardsGenerator
- Defined in:
- lib/generators/hack_cards/hack_cards_generator.rb
Overview
railscast 218
Instance Method Summary collapse
- #generate_partials ⇒ Object
-
#generate_stylesheets ⇒ Object
all public methods inside a generator will be executed when you call the generator.
Instance Method Details
#generate_partials ⇒ Object
17 18 19 |
# File 'lib/generators/hack_cards/hack_cards_generator.rb', line 17 def generate_partials template "card.html.erb", "app/views/layouts/card.html.erb" end |
#generate_stylesheets ⇒ Object
all public methods inside a generator will be executed when you call the generator
13 14 15 |
# File 'lib/generators/hack_cards/hack_cards_generator.rb', line 13 def generate_stylesheets copy_file "stylesheet.scss", "app/assets/stylsheets/#{layout_name}.scss" end |