Sha256: 576f85780d498aa3ea9f1caca51f877579d7e34194094a32d02139d7f67c5e76

Contents?: true

Size: 1.2 KB

Versions: 4

Compression:

Stored size: 1.2 KB

Contents

<%- @modules.each do |module_name| %><%= "  "* @indent %>module <%= module_name.camelize %><%- @indent += 1 %>
<%- end %><%="  "* @indent %>class <%= @file_name %> < <%= @component_base_class %>
<%="  "* @indent %>  include Hyperstack::Router
<%="  "* @indent %>  render do
<%="  "* @indent %>    DIV do
<%="  "* @indent %>      '<%= (@modules+[@file_name]).join('::') %>'
<%- unless @no_help %><%="  "* @indent %>      # define routes using the Route psuedo component.  Examples:
<%="  "* @indent %>      # Route('/foo', mounts: Foo)                : match the path beginning with /foo and mount component Foo here
<%="  "* @indent %>      # Route('/foo') { Foo(...) }                : display the contents of the block
<%="  "* @indent %>      # Route('/', exact: true, mounts: Home)     : match the exact path / and mount the Home component
<%="  "* @indent %>      # Route('/user/:id/name', mounts: UserName) : path segments beginning with a colon will be captured in the match param
<%="  "* @indent %>      # see the hyper-router gem documentation for more details
<%- end %><%="  "* @indent %>    end
<%="  "* @indent %>  end
<%="  "* @indent %>end
<%- @modules.each do %><%- @indent -= 1 %><%="  "* @indent %>end
<%- end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails-hyperstack-1.0.alpha1.8 lib/generators/hyper/templates/router_template.rb
rails-hyperstack-1.0.alpha1.7 lib/generators/hyper/templates/router_template.rb
rails-hyperstack-1.0.alpha1.6 lib/generators/hyper/templates/router_template.rb
rails-hyperstack-1.0.alpha1.5 lib/generators/hyper/templates/router_template.rb