Class: Kafka::Protocol::ApiVersionsResponse::ApiInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/kafka/protocol/api_versions_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key:, min_version:, max_version:) ⇒ ApiInfo

Returns a new instance of ApiInfo.



8
9
10
# File 'lib/kafka/protocol/api_versions_response.rb', line 8

def initialize(api_key:, min_version:, max_version:)
  @api_key, @min_version, @max_version = api_key, min_version, max_version
end

Instance Attribute Details

#api_keyObject (readonly)

Returns the value of attribute api_key.



6
7
8
# File 'lib/kafka/protocol/api_versions_response.rb', line 6

def api_key
  @api_key
end

#max_versionObject (readonly)

Returns the value of attribute max_version.



6
7
8
# File 'lib/kafka/protocol/api_versions_response.rb', line 6

def max_version
  @max_version
end

#min_versionObject (readonly)

Returns the value of attribute min_version.



6
7
8
# File 'lib/kafka/protocol/api_versions_response.rb', line 6

def min_version
  @min_version
end

Instance Method Details

#api_nameObject



12
13
14
# File 'lib/kafka/protocol/api_versions_response.rb', line 12

def api_name
  Protocol.api_name(api_key)
end

#inspectObject



20
21
22
# File 'lib/kafka/protocol/api_versions_response.rb', line 20

def inspect
  "#<Kafka api version #{to_s}>"
end

#to_sObject



16
17
18
# File 'lib/kafka/protocol/api_versions_response.rb', line 16

def to_s
  "#{api_name}=#{min_version}..#{max_version}"
end