Class: LeoFSManager::Status::Node
- Inherits:
-
Object
- Object
- LeoFSManager::Status::Node
- Defined in:
- lib/leofs_manager_client/leofs_manager_models.rb
Overview
Node Status Model
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) ⇒ Node
constructor
A new instance of Node.
Constructor Details
#initialize(h) ⇒ Node
Returns a new instance of Node.
70 71 72 73 74 75 76 77 78 |
# File 'lib/leofs_manager_client/leofs_manager_models.rb', line 70 def initialize(h) @type = h[:type] @node = h[:node] @when = Time.parse(h[:when]) @state = h[:state] #XXX: these are written in hex @ring_cur = h[:ring_cur] @ring_prev = h[:ring_prev] end |
Instance Attribute Details
#node ⇒ Object (readonly)
Returns the value of attribute node.
68 69 70 |
# File 'lib/leofs_manager_client/leofs_manager_models.rb', line 68 def node @node end |
#ring_cur ⇒ Object (readonly)
Returns the value of attribute ring_cur.
68 69 70 |
# File 'lib/leofs_manager_client/leofs_manager_models.rb', line 68 def ring_cur @ring_cur end |
#ring_prev ⇒ Object (readonly)
Returns the value of attribute ring_prev.
68 69 70 |
# File 'lib/leofs_manager_client/leofs_manager_models.rb', line 68 def ring_prev @ring_prev end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
68 69 70 |
# File 'lib/leofs_manager_client/leofs_manager_models.rb', line 68 def state @state end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
68 69 70 |
# File 'lib/leofs_manager_client/leofs_manager_models.rb', line 68 def type @type end |
#when ⇒ Object (readonly) Also known as: joined_at
Returns the value of attribute when.
68 69 70 |
# File 'lib/leofs_manager_client/leofs_manager_models.rb', line 68 def when @when end |