Class: LeoManager::Status::NodeInfo
- Inherits:
-
Object
- Object
- LeoManager::Status::NodeInfo
- Defined in:
- lib/leo_manager_models.rb
Overview
Node Info
Instance Attribute Summary collapse
-
#node ⇒ Object
readonly
Returns the value of attribute node.
-
#ring_cur ⇒ Object
readonly
Returns the value of attribute ring_cur.
-
#ring_prev ⇒ Object
readonly
Returns the value of attribute ring_prev.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#when ⇒ Object
(also: #joined_at)
readonly
Returns the value of attribute when.
Instance Method Summary collapse
-
#initialize(h) ⇒ NodeInfo
constructor
A new instance of NodeInfo.
Constructor Details
#initialize(h) ⇒ NodeInfo
Returns a new instance of NodeInfo.
94 95 96 97 98 99 100 101 |
# File 'lib/leo_manager_models.rb', line 94 def initialize(h) @type = h[:type] @node = h[:node] @when = Time.parse(h[:when]) @state = h[:state] @ring_cur = h[:ring_cur] @ring_prev = h[:ring_prev] end |
Instance Attribute Details
#node ⇒ Object (readonly)
Returns the value of attribute node.
92 93 94 |
# File 'lib/leo_manager_models.rb', line 92 def node @node end |
#ring_cur ⇒ Object (readonly)
Returns the value of attribute ring_cur.
92 93 94 |
# File 'lib/leo_manager_models.rb', line 92 def ring_cur @ring_cur end |
#ring_prev ⇒ Object (readonly)
Returns the value of attribute ring_prev.
92 93 94 |
# File 'lib/leo_manager_models.rb', line 92 def ring_prev @ring_prev end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
92 93 94 |
# File 'lib/leo_manager_models.rb', line 92 def state @state end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
92 93 94 |
# File 'lib/leo_manager_models.rb', line 92 def type @type end |
#when ⇒ Object (readonly) Also known as: joined_at
Returns the value of attribute when.
92 93 94 |
# File 'lib/leo_manager_models.rb', line 92 def when @when end |