Method: TextDoc#initialize
- Defined in:
- lib/buzzcore/text_doc.rb
#initialize(aWidth = 80, aHeight = 66) ⇒ TextDoc
Returns a new instance of TextDoc.
10 11 12 13 14 15 16 17 |
# File 'lib/buzzcore/text_doc.rb', line 10 def initialize(aWidth=80,aHeight=66) @width = aWidth @height = aHeight @lines = Array.new(@height) line_str = ' '*@width @lines.collect!{|line| line_str.clone } end |