class Slim::Generators::ComponentGenerator

def copy_view_file

def copy_view_file
  template "component.html.slim", destination
end

def destination

def destination
  if options["sidecar"]
    File.join("app/components", class_path, "#{file_name}_component", "#{file_name}_component.html.slim")
  else
    File.join("app/components", class_path, "#{file_name}_component.html.slim")
  end
end

def file_name

def file_name
  @_file_name ||= super.sub(/_component\z/i, "")
end