Class: PuppetEditorServices::Protocol::JsonRPCMessages::NotificationMessage
- Inherits:
-
Message
- Object
- Message
- PuppetEditorServices::Protocol::JsonRPCMessages::NotificationMessage
- Defined in:
- lib/puppet_editor_services/protocol/json_rpc_messages.rb
Overview
/**
* The notification's params.
*/
params?: Array<any> | object;
}
Instance Attribute Summary collapse
-
#params ⇒ Object
Returns the value of attribute params.
-
#rpc_method ⇒ Object
Returns the value of attribute rpc_method.
Attributes inherited from Message
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ NotificationMessage
constructor
A new instance of NotificationMessage.
- #to_h ⇒ Object
Methods inherited from Message
Constructor Details
#initialize(initial_hash = nil) ⇒ NotificationMessage
Returns a new instance of NotificationMessage.
91 92 93 |
# File 'lib/puppet_editor_services/protocol/json_rpc_messages.rb', line 91 def initialize(initial_hash = nil) super end |
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params.
89 90 91 |
# File 'lib/puppet_editor_services/protocol/json_rpc_messages.rb', line 89 def params @params end |
#rpc_method ⇒ Object
Returns the value of attribute rpc_method.
89 90 91 |
# File 'lib/puppet_editor_services/protocol/json_rpc_messages.rb', line 89 def rpc_method @rpc_method end |
Instance Method Details
#from_h!(value) ⇒ Object
95 96 97 98 99 100 101 |
# File 'lib/puppet_editor_services/protocol/json_rpc_messages.rb', line 95 def from_h!(value) value = {} if value.nil? super self.rpc_method = value['method'] self.params = value['params'] self end |
#to_h ⇒ Object
103 104 105 106 107 |
# File 'lib/puppet_editor_services/protocol/json_rpc_messages.rb', line 103 def to_h hash = { 'method' => rpc_method } hash['params'] = params unless params.nil? super.merge(hash) end |