Method: WindowTerminal::WindowManager#get_page_text

Defined in:
lib/accu-window.rb

#get_page_text(num) ⇒ Object

Gets all Text and Text subclass objects on the page given and returns them all as an array.

Raises:

  • (ArgumentError)


518
519
520
521
522
523
524
525
526
527
528
529
530
# File 'lib/accu-window.rb', line 518

def get_page_text(num)
	raise(ArgumentError, "Argument 1 must be a valid integer!") if (not (num.is_a? Fixnum))
	array = []
	@pages[num-1].each {|window|
		array << window.objects.dup
		array[-1].each {|item|
			if (not (item.respond_to? :set_text)) then
				array[-1].delete(item)
			end
		}
	}
	return array
end