Class: Tinker::Network::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/tinker/network/message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Message

Returns a new instance of Message.



5
6
7
8
9
# File 'lib/tinker/network/message.rb', line 5

def initialize(params)
  [:socket, :body].each do |param|
    instance_variable_set("@#{param}", params[param])
  end
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



3
4
5
# File 'lib/tinker/network/message.rb', line 3

def body
  @body
end

#socketObject (readonly)

Returns the value of attribute socket.



3
4
5
# File 'lib/tinker/network/message.rb', line 3

def socket
  @socket
end