Class: Feedx::Format::JSON::Encoder

Inherits:
Abstract::Encoder show all
Defined in:
lib/feedx/format/json.rb

Instance Method Summary collapse

Methods inherited from Abstract::Encoder

#close

Methods inherited from Abstract::Wrapper

#initialize, open

Constructor Details

This class inherits a constructor from Feedx::Format::Abstract::Wrapper

Instance Method Details

#encode(msg, **opts) ⇒ Object



16
17
18
# File 'lib/feedx/format/json.rb', line 16

def encode(msg, **opts)
  @io.write msg.to_json(**opts) << "\n"
end