Class: Buffer

Inherits:
Area
  • Object
show all
Defined in:
lib/context/areas/buffer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Area

#render

Methods included from Context

#header

Constructor Details

#initialize(coords, options = {}) ⇒ Buffer

Returns a new instance of Buffer.



3
4
5
6
# File 'lib/context/areas/buffer.rb', line 3

def initialize(coords, options={})
  @text = {}
  super(coords, options)
end

Instance Attribute Details

#textObject

Returns the value of attribute text.



2
3
4
# File 'lib/context/areas/buffer.rb', line 2

def text
  @text
end

Instance Method Details

#recordObject



12
13
14
# File 'lib/context/areas/buffer.rb', line 12

def record
  record = super.merge({:text => text})
end

#sizesObject



8
9
10
# File 'lib/context/areas/buffer.rb', line 8

def sizes
  {:standard => {:height => 0.5, :unit => 'inches'}}
end