Class: NATS::JetStream::API::ConsumerConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/polyn/nats/jetstream/api/consumer_config.rb

Overview

Monkey Patch ConsumerConfig to ensure that nil values are removed on a call to ‘to_json` even if ActiveSupport is being used.

Instance Method Summary collapse

Instance Method Details

#as_json(*args) ⇒ Object



8
9
10
# File 'lib/polyn/nats/jetstream/api/consumer_config.rb', line 8

def as_json(*args)
  to_h.compact.as_json(*args)
end