Sha256: ba56505e90289d27e85ef28e4b04ecef16626eb89154954293aa3b9fd17ae30f

Contents?: true

Size: 492 Bytes

Versions: 28

Compression:

Stored size: 492 Bytes

Contents

module Cells
  module Generators
    class ViewGenerator < Base
      def create_views
        for state in actions do
          @state  = state
          @path   = File.join(base_path, "#{state}.html.#{handler}")  #base_path defined in Cells::Generators::Base.
          template "view.#{handler}", @path
        end
      end
      
    private
      def handler
        raise "Please implement #handler in your view generator and return something like `:erb`."
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
cells-3.11.3 lib/generators/cells/view_generator.rb
cells-3.11.2 lib/generators/cells/view_generator.rb
cells-3.11.1 lib/generators/cells/view_generator.rb
cells-3.11.0 lib/generators/cells/view_generator.rb
cells-3.10.1 lib/generators/cells/view_generator.rb
cells-3.10.0 lib/generators/cells/view_generator.rb
cells-3.9.1 lib/generators/cells/view_generator.rb
cells-3.9.0 lib/generators/cells/view_generator.rb
cells-3.8.8 lib/generators/cells/view_generator.rb
cells-3.8.7 lib/generators/cells/view_generator.rb
cells-3.8.6 lib/generators/cells/view_generator.rb
cells-3.8.5 lib/generators/cells/view_generator.rb
cells-3.8.4 lib/generators/cells/view_generator.rb
cells-3.8.3 lib/generators/cells/view_generator.rb
cells-3.8.2 lib/generators/cells/view_generator.rb
cells-3.8.1 lib/generators/cells/view_generator.rb
cells-3.8.0 lib/generators/cells/view_generator.rb
cells-3.7.1 lib/generators/cells/view_generator.rb
cells-3.7.0 lib/generators/cells/view_generator.rb
cells-3.6.7 lib/generators/cells/view_generator.rb