Sha256: 4ba6da9f63db1bbe230720406e4100a93b5a459b710a32542516ac21a1ccf307

Contents?: true

Size: 509 Bytes

Versions: 4

Compression:

Stored size: 509 Bytes

Contents

# frozen_string_literal: true

require 'thor'

<%- app_constantinized_parts.each_with_index do |const, i| -%>
<%= '  ' * i %>module <%= const %>
<%- end -%>
<%= app_indent %>module Commands
<%= app_indent %>  class <%= cmd_name_constantinized %> < Thor

<%= app_indent %>    namespace :<%= cmd_name_underscored %>
<%- (cmd_constantinized_parts.size - 1).downto(1) do |i| -%>
<%= app_indent + ('  ' * i) %>end
<%- end -%>
<%- (app_constantinized_parts.size).downto(0) do |i| -%>
<%= '  ' * i %>end
<%- end -%>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tty-0.10.0 lib/tty/templates/add/namespace.rb.tt
tty-0.9.1 lib/tty/templates/add/namespace.rb.tt
tty-0.8.1 lib/tty/templates/add/namespace.rb.tt
tty-0.8.0 lib/tty/templates/add/namespace.rb.tt