Class: Cream::Generators::ViewsGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
HamlUtil
Defined in:
lib/generators/cream/views/views_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from HamlUtil

#create_and_copy_haml_views, #verify_haml_existence, #verify_haml_version

Class Method Details

.source_rootObject



13
14
15
# File 'lib/generators/cream/views/views_generator.rb', line 13

def self.source_root
  @_devise_source_root ||= File.expand_path("app/views".path.up(5), __FILE__)
end

Instance Method Details

#copy_viewsObject



17
18
19
20
21
22
23
# File 'lib/generators/cream/views/views_generator.rb', line 17

def copy_views
  if options[:haml]
    create_and_copy_haml_views
  else
    copy_erb_views
  end
end