Class: Nyan::Buffer
- Inherits:
-
Array
- Object
- Array
- Nyan::Buffer
- Defined in:
- lib/nyan/buffer.rb
Instance Method Summary collapse
-
#initialize(height, width, default) ⇒ Buffer
constructor
A new instance of Buffer.
- #to_s ⇒ Object
Constructor Details
#initialize(height, width, default) ⇒ Buffer
Returns a new instance of Buffer.
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/nyan/buffer.rb', line 3 def initialize(height, width, default) @height = height @width = width @default = default super(height) do Array.new(width) do default end end end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/nyan/buffer.rb', line 14 def to_s join end |