Class: Haml::Generators::WidgetGenerator

Inherits:
Cells::Generators::Base
  • Object
show all
Defined in:
lib/generators/haml/widget_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_viewsObject



8
9
10
11
12
13
14
15
# File 'lib/generators/haml/widget_generator.rb', line 8

def create_views
  for state in actions do
    @state  = state
    @path   = File.join('app/widgets', file_name, "#{state}.html.haml")

    template "view.haml", @path
  end
end