Class: Pinot::BrokerDto
- Inherits:
-
Object
- Object
- Pinot::BrokerDto
- Defined in:
- lib/pinot/controller_response.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#instance_name ⇒ Object
readonly
Returns the value of attribute instance_name.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
Instance Method Summary collapse
- #broker_address ⇒ Object
-
#initialize(hash) ⇒ BrokerDto
constructor
A new instance of BrokerDto.
Constructor Details
#initialize(hash) ⇒ BrokerDto
Returns a new instance of BrokerDto.
5 6 7 8 9 |
# File 'lib/pinot/controller_response.rb', line 5 def initialize(hash) @host = hash["host"] @port = hash["port"].to_i @instance_name = hash["instanceName"] end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
3 4 5 |
# File 'lib/pinot/controller_response.rb', line 3 def host @host end |
#instance_name ⇒ Object (readonly)
Returns the value of attribute instance_name.
3 4 5 |
# File 'lib/pinot/controller_response.rb', line 3 def instance_name @instance_name end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
3 4 5 |
# File 'lib/pinot/controller_response.rb', line 3 def port @port end |
Instance Method Details
#broker_address ⇒ Object
11 12 13 |
# File 'lib/pinot/controller_response.rb', line 11 def broker_address "#{@host}:#{@port}" end |