Class: Evinrude::Message::VoteRequest
- Inherits:
-
Evinrude::Message
- Object
- Evinrude::Message
- Evinrude::Message::VoteRequest
- Defined in:
- lib/evinrude/message/vote_request.rb
Instance Attribute Summary collapse
-
#candidate_info ⇒ Object
readonly
Returns the value of attribute candidate_info.
-
#last_log_index ⇒ Object
readonly
Returns the value of attribute last_log_index.
-
#last_log_term ⇒ Object
readonly
Returns the value of attribute last_log_term.
-
#term ⇒ Object
readonly
Returns the value of attribute term.
Instance Method Summary collapse
- #expected_reply_types ⇒ Object
-
#initialize(term:, candidate_info:, last_log_index:, last_log_term:) ⇒ VoteRequest
constructor
A new instance of VoteRequest.
Methods inherited from Evinrude::Message
classes, parse, permitted_classes
Constructor Details
#initialize(term:, candidate_info:, last_log_index:, last_log_term:) ⇒ VoteRequest
Returns a new instance of VoteRequest.
9 10 11 |
# File 'lib/evinrude/message/vote_request.rb', line 9 def initialize(term:, candidate_info:, last_log_index:, last_log_term:) @term, @candidate_info, @last_log_index, @last_log_term = term, candidate_info, last_log_index, last_log_term end |
Instance Attribute Details
#candidate_info ⇒ Object (readonly)
Returns the value of attribute candidate_info.
7 8 9 |
# File 'lib/evinrude/message/vote_request.rb', line 7 def candidate_info @candidate_info end |
#last_log_index ⇒ Object (readonly)
Returns the value of attribute last_log_index.
7 8 9 |
# File 'lib/evinrude/message/vote_request.rb', line 7 def last_log_index @last_log_index end |
#last_log_term ⇒ Object (readonly)
Returns the value of attribute last_log_term.
7 8 9 |
# File 'lib/evinrude/message/vote_request.rb', line 7 def last_log_term @last_log_term end |
#term ⇒ Object (readonly)
Returns the value of attribute term.
7 8 9 |
# File 'lib/evinrude/message/vote_request.rb', line 7 def term @term end |
Instance Method Details
#expected_reply_types ⇒ Object
13 14 15 |
# File 'lib/evinrude/message/vote_request.rb', line 13 def expected_reply_types [VoteReply] end |