Class: FrameIOSlots
- Inherits:
-
Object
- Object
- FrameIOSlots
- Defined in:
- lib/HMC/FrameIOSlots.rb
Instance Attribute Summary collapse
-
#data_string_raw ⇒ Object
readonly
Returns the value of attribute data_string_raw.
Instance Method Summary collapse
- #get_lpar(lpar) ⇒ Object
-
#initialize(string = '') ⇒ FrameIOSlots
constructor
A new instance of FrameIOSlots.
- #parse(string) ⇒ Object
Constructor Details
#initialize(string = '') ⇒ FrameIOSlots
Returns a new instance of FrameIOSlots.
8 9 10 11 12 13 14 15 16 |
# File 'lib/HMC/FrameIOSlots.rb', line 8 def initialize(string = '') @array = Array.new() unless string.empty? @data_string_raw = string parse(string) end end |
Instance Attribute Details
#data_string_raw ⇒ Object (readonly)
Returns the value of attribute data_string_raw.
6 7 8 |
# File 'lib/HMC/FrameIOSlots.rb', line 6 def data_string_raw @data_string_raw end |
Instance Method Details
#get_lpar(lpar) ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/HMC/FrameIOSlots.rb', line 26 def get_lpar(lpar) @array.each do |slot| # if lpar == slot.lpar_name # pp slot.lpar_name.to_s + " " + slot.description # end end end |
#parse(string) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/HMC/FrameIOSlots.rb', line 18 def parse(string) string.each_line do |line| @array << FrameIOSlot.new(line) end end |