class Haml::Generators::ComponentGenerator
Public Instance Methods
copy_view_file()
click to toggle source
# File lib/rails/generators/haml/component_generator.rb, line 10 def copy_view_file template "component.html.haml", File.join("app/components", class_path, "#{file_name}_component.html.haml") end
Private Instance Methods
file_name()
click to toggle source
Calls superclass method
Erb::Generators::ComponentGenerator#file_name
# File lib/rails/generators/haml/component_generator.rb, line 16 def file_name @_file_name ||= super.sub(/_component\z/i, "") end