diff options
Diffstat (limited to 'lib/bundler/templates/newgem/lib/newgem.rb.tt')
-rw-r--r-- | lib/bundler/templates/newgem/lib/newgem.rb.tt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/bundler/templates/newgem/lib/newgem.rb.tt b/lib/bundler/templates/newgem/lib/newgem.rb.tt index 7d8ad90ab0..457172b403 100644 --- a/lib/bundler/templates/newgem/lib/newgem.rb.tt +++ b/lib/bundler/templates/newgem/lib/newgem.rb.tt @@ -6,6 +6,11 @@ require "<%= config[:namespaced_path] %>/<%= config[:underscored_name] %>" <%- config[:constant_array].each_with_index do |c, i| -%> <%= " " * i %>module <%= c %> <%- end -%> +<%- if config[:error_class] -%> +<%= " " * config[:constant_array].size %>class Error < <%= config[:error_class] %> +<%= " " * config[:constant_array].size %> # Base class for your errors +<%= " " * config[:constant_array].size %>end +<%- end -%> <%= " " * config[:constant_array].size %># Your code goes here... <%- (config[:constant_array].size-1).downto(0) do |i| -%> <%= " " * i %>end |