class Redditor::Generators::ViewsGenerator

Public Instance Methods

copy_views() click to toggle source
# File lib/generators/redditor/views/views_generator.rb, line 12
def copy_views
  return copy_default_views if file_name == 'default'
  return copy_admin_views if file_name == 'admin'
  return copy_front_views if file_name == 'front'
end

Private Instance Methods

copy_admin_views() click to toggle source
# File lib/generators/redditor/views/views_generator.rb, line 24
def copy_admin_views
  directory "redditor/admin", "app/views/redditor/admin"
end
copy_default_views() click to toggle source
# File lib/generators/redditor/views/views_generator.rb, line 20
def copy_default_views
  directory "redditor", "app/views/redditor"
end
copy_front_views() click to toggle source
# File lib/generators/redditor/views/views_generator.rb, line 28
def copy_front_views
  template "redditor/_image.html.haml", "app/views/redditor/_image.html.haml"
  template "redditor/_page.html.haml", "app/views/redditor/_page.html.haml"
  template "redditor/_slider_block.html.haml", "app/views/redditor/_slider_block.html.haml"
  template "redditor/_slider_block_image.html.haml", "app/views/redditor/_slider_block_image.html.haml"
  template "redditor/_text_block.html.haml", "app/views/redditor/_text_block.html.haml"
  template "redditor/_video_block.html.haml", "app/views/redditor/_video_block.html.haml"
end