Class: Streamdal::Audience

Inherits:
Struct
  • Object
show all
Defined in:
lib/streamdal.rb

Overview

Data class to store/pass audiences

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#component_nameObject

Returns the value of attribute component_name

Returns:

  • (Object)

    the current value of component_name



58
59
60
# File 'lib/streamdal.rb', line 58

def component_name
  @component_name
end

#operation_nameObject

Returns the value of attribute operation_name

Returns:

  • (Object)

    the current value of operation_name



58
59
60
# File 'lib/streamdal.rb', line 58

def operation_name
  @operation_name
end

#operation_typeObject

Returns the value of attribute operation_type

Returns:

  • (Object)

    the current value of operation_type



58
59
60
# File 'lib/streamdal.rb', line 58

def operation_type
  @operation_type
end

Instance Method Details

#to_proto(service_name) ⇒ Object



59
60
61
62
63
64
65
66
# File 'lib/streamdal.rb', line 59

def to_proto(service_name)
  Streamdal::Protos::Audience.new(
    operation_type: Streamdal::Protos::OperationType.lookup(operation_type.to_i),
    operation_name: operation_name,
    component_name: component_name,
    service_name: service_name,
  )
end