class Message
Attributes
client_id[R]
content[R]
handle[R]
Public Class Methods
inflate(json)
click to toggle source
# File lib/backchannel/message.rb, line 6 def self.inflate(json) attributes = JSON.parse(json) new(attributes) end
new(attributes={})
click to toggle source
# File lib/backchannel/message.rb, line 11 def initialize(attributes={}) @client_id = attributes.fetch("client_id") @handle = attributes.fetch("handle") @content = attributes.fetch("content") end
Public Instance Methods
to_json()
click to toggle source
# File lib/backchannel/message.rb, line 17 def to_json { client_id: client_id, handle: handle, content: content }.to_json end