class Haml::Generators::ComponentGenerator

Public Instance Methods

copy_view_file() click to toggle source
# File lib/rails/generators/haml/component_generator.rb, line 11
def copy_view_file
  if !options["inline"]
    template "component.html.haml", destination
  end
end

Private Instance Methods

destination() click to toggle source
# File lib/rails/generators/haml/component_generator.rb, line 19
def destination
  if options["sidecar"]
    File.join("app/components", class_path, "#{file_name}", "#{file_name}.html.haml")
  else
    File.join("app/components", class_path, "#{file_name}.html.haml")
  end
end