Class: Faymora::Client
- Inherits:
-
GlooX::Client
- Object
- GlooX::Client
- Faymora::Client
- Defined in:
- lib/faymora/client.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
- #to_data ⇒ Object
- #to_msgpack(packer) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
5 6 7 8 |
# File 'lib/faymora/client.rb', line 5 def initialize( = {} ) = .symbolize_keys super( .merge serializer: ::MessagePack ) end |
Class Method Details
.from_data(data) ⇒ Object
20 21 22 |
# File 'lib/faymora/client.rb', line 20 def self.from_data( data ) new( data.symbolize_keys ) end |
Instance Method Details
#to_data ⇒ Object
14 15 16 17 18 |
# File 'lib/faymora/client.rb', line 14 def to_data data = @opts.dup data.delete :serializer data end |
#to_msgpack(packer) ⇒ Object
10 11 12 |
# File 'lib/faymora/client.rb', line 10 def to_msgpack( packer ) packer.pack to_data end |