Class: EventHookClientServer::Grpc::StructEncoder

Inherits:
Service
  • Object
show all
Defined in:
lib/event_hook_client_server/services/grpc/struct_encoder.rb

Defined Under Namespace

Classes: Error, NonEncodeableObjectError, NonPrimitivValueError

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Service

call

Constructor Details

#initialize(object) ⇒ StructEncoder

Returns a new instance of StructEncoder.



12
13
14
# File 'lib/event_hook_client_server/services/grpc/struct_encoder.rb', line 12

def initialize(object)
  @object = object
end

Instance Attribute Details

#objectObject (readonly)

Returns the value of attribute object.



10
11
12
# File 'lib/event_hook_client_server/services/grpc/struct_encoder.rb', line 10

def object
  @object
end

Instance Method Details

#callObject



16
17
18
19
20
# File 'lib/event_hook_client_server/services/grpc/struct_encoder.rb', line 16

def call
  return if object.nil?

  cast_hash(hash_value)
end