Class: Moleculer::Packets::Info::Client
- Inherits:
-
Object
- Object
- Moleculer::Packets::Info::Client
- Includes:
- Support
- Defined in:
- lib/moleculer/packets/info.rb
Overview
Represents the client information for a given node
Instance Attribute Summary collapse
-
#lang_version ⇒ Object
readonly
Returns the value of attribute lang_version.
-
#type ⇒ String
readonly
Type of client implementation (nodejs, java, ruby etc.).
-
#version ⇒ String
readonly
The version of the moleculer client.
Instance Method Summary collapse
-
#initialize(data) ⇒ Client
constructor
A new instance of Client.
-
#to_h ⇒ Hash
The object prepared for conversion to JSON for transmission.
Constructor Details
Instance Attribute Details
#lang_version ⇒ Object (readonly)
Returns the value of attribute lang_version.
22 23 24 |
# File 'lib/moleculer/packets/info.rb', line 22 attr_reader :type, :version, :lang_version |
#type ⇒ String (readonly)
Returns type of client implementation (nodejs, java, ruby etc.).
22 23 24 |
# File 'lib/moleculer/packets/info.rb', line 22 def type @type end |
#version ⇒ String (readonly)
Returns the version of the moleculer client.
22 23 24 |
# File 'lib/moleculer/packets/info.rb', line 22 attr_reader :type, :version, :lang_version |
Instance Method Details
#to_h ⇒ Hash
Returns the object prepared for conversion to JSON for transmission.
34 35 36 37 38 39 40 |
# File 'lib/moleculer/packets/info.rb', line 34 def to_h { type: @type, version: @version, langVersion: @lang_version, } end |