Sha256: de0ef7e40939331d0ffbf2b7c2806d01dabb119646dbdfc2a61a51442f35a58b
Contents?: true
Size: 730 Bytes
Versions: 6
Compression:
Stored size: 730 Bytes
Contents
module Legion::Extensions::<%= config[:lex].split('_').collect(&:capitalize).join %> module Transport module Messages class <%= config[:name].split('_').collect(&:capitalize).join %> < Legion::Transport::Message def initialize(payload, status, options = {}) @payload = payload @options = options @status = status @routing_key = routing_key validate end def routing_key "<%= config[:lex].split('_').collect(&:capitalize).join %>.<%= config[:name].split('_').collect(&:capitalize).join %>" end def message(payload = @payload, _options = {}) Legion::JSON.dump(payload) end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems