Class: Nis::Struct::NodeCollection
- Inherits:
-
Object
- Object
- Nis::Struct::NodeCollection
- Includes:
- Util::Assignable
- Defined in:
- lib/nis/struct/node_collection.rb
Overview
Instance Attribute Summary collapse
-
#active ⇒ Array
The current value of active.
-
#busy ⇒ Array
The current value of busy.
-
#failure ⇒ Array
The current value of failure.
-
#inactive ⇒ Array
The current value of inactive.
Class Method Summary collapse
Methods included from Util::Assignable
#[], #initialize, #to_hash, #to_json
Instance Attribute Details
#active ⇒ Array
Returns the current value of active.
7 8 9 |
# File 'lib/nis/struct/node_collection.rb', line 7 def active @active end |
#busy ⇒ Array
Returns the current value of busy.
7 8 9 |
# File 'lib/nis/struct/node_collection.rb', line 7 def busy @busy end |
#failure ⇒ Array
Returns the current value of failure.
7 8 9 |
# File 'lib/nis/struct/node_collection.rb', line 7 def failure @failure end |
#inactive ⇒ Array
Returns the current value of inactive.
7 8 9 |
# File 'lib/nis/struct/node_collection.rb', line 7 def inactive @inactive end |
Class Method Details
.build(attrs) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/nis/struct/node_collection.rb', line 11 def self.build(attrs) new( inactive: attrs[:inactive].map { |n| Node.build(n) }, active: attrs[:active].map { |n| Node.build(n) }, busy: attrs[:busy].map { |n| Node.build(n) }, failure: attrs[:failure].map { |n| Node.build(n) } ) end |