Class: Raft::LogEntry
- Inherits:
-
Object
- Object
- Raft::LogEntry
- Defined in:
- lib/raft.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#term ⇒ Object
readonly
Returns the value of attribute term.
Instance Method Summary collapse
-
#initialize(term, index, command) ⇒ LogEntry
constructor
A new instance of LogEntry.
Constructor Details
#initialize(term, index, command) ⇒ LogEntry
Returns a new instance of LogEntry.
21 22 23 |
# File 'lib/raft.rb', line 21 def initialize(term, index, command) @term, @index, @command = term, index, command end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
19 20 21 |
# File 'lib/raft.rb', line 19 def command @command end |
#index ⇒ Object (readonly)
Returns the value of attribute index.
19 20 21 |
# File 'lib/raft.rb', line 19 def index @index end |
#term ⇒ Object (readonly)
Returns the value of attribute term.
19 20 21 |
# File 'lib/raft.rb', line 19 def term @term end |