class Alchemy::Generators::ViewsGenerator

Constants

ALCHEMY_VIEWS

Public Instance Methods

copy_alchemy_views() click to toggle source
# File lib/generators/alchemy/views/views_generator.rb, line 24
def copy_alchemy_views
  views_to_copy.each do |dir|
    directory dir, Rails.root.join("app/views/alchemy", dir)
  end
end

Private Instance Methods

views_to_copy() click to toggle source
# File lib/generators/alchemy/views/views_generator.rb, line 32
def views_to_copy
  if @options["except"]
    ALCHEMY_VIEWS - @options["except"]
  elsif @options["only"]
    ALCHEMY_VIEWS.select { |v| @options["only"].include?(v) }
  else
    ALCHEMY_VIEWS
  end
end