Sha256: 9bc77101c40a588b72f06cf69d305b4ee9a68cbf72280fd6d4c6f08661ed1660

Contents?: true

Size: 297 Bytes

Versions: 1

Compression:

Stored size: 297 Bytes

Contents

class Ircmad
  class Zircon::Message
    def to_json
      fencoding = -> s { s.respond_to?(:force_encoding) ? s.force_encoding('UTF-8') : s }
      {
        username: fencoding.call(from),
        channel: fencoding.call(to),
        body: fencoding.call(body)
      }.to_json
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ircmad-0.0.2 lib/ircmad/zircon_ext.rb