Class: LeoManager::Status::NodeInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/leo_manager_models.rb

Overview

Node Info

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nodeObject (readonly)

Returns the value of attribute node.



92
93
94
# File 'lib/leo_manager_models.rb', line 92

def node
  @node
end

#ring_curObject (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_prevObject (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

#stateObject (readonly)

Returns the value of attribute state.



92
93
94
# File 'lib/leo_manager_models.rb', line 92

def state
  @state
end

#typeObject (readonly)

Returns the value of attribute type.



92
93
94
# File 'lib/leo_manager_models.rb', line 92

def type
  @type
end

#whenObject (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