Sha256: dc617186cd377803f78b16ede5080129445283a22572e0b3562e28fca256a9ae
Contents?: true
Size: 623 Bytes
Versions: 2
Compression:
Stored size: 623 Bytes
Contents
<% module_path[..-2].each do |part| %> module <%= part %> <% end %> class <%= module_path.last %> < Foobara::Command # class SomeError < RuntimeError # class << self # def context_type_declaration # { foo: :string } # end # end # end # possible_error SomeError inputs do foo :string, default: "bar" end result :string # depends_on SomeOtherCommand def execute do_something end # def validate # add_runtime_error SomeError.new(message: "kaboom", context: {foo: :bar}) # end def do_something foo end <% module_path.size.times do %> end <% end %>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
foobara-command-generator-0.0.3 | templates/src/command.rb.erb |
foobara-command-generator-0.0.2 | templates/src/command.rb.erb |