Class: Chunks::Chunk
Instance Attribute Summary collapse
-
#chunk ⇒ Object
readonly
color_pair of associated text text to print attribute of associated text attr_accessor :color, :text, :attrib.
Instance Method Summary collapse
- #attrib ⇒ Object
- #color ⇒ Object
-
#initialize(color, text, attrib) ⇒ Chunk
constructor
A new instance of Chunk.
- #text ⇒ Object
Constructor Details
#initialize(color, text, attrib) ⇒ Chunk
Returns a new instance of Chunk.
21 22 23 24 25 26 |
# File 'lib/rbcurse/core/include/chunk.rb', line 21 def initialize color, text, attrib @chunk = [ color, text, attrib ] #@color = color #@text = text #@attrib = attrib end |
Instance Attribute Details
#chunk ⇒ Object (readonly)
color_pair of associated text text to print attribute of associated text attr_accessor :color, :text, :attrib
19 20 21 |
# File 'lib/rbcurse/core/include/chunk.rb', line 19 def chunk @chunk end |
Instance Method Details
#attrib ⇒ Object
33 34 35 |
# File 'lib/rbcurse/core/include/chunk.rb', line 33 def attrib @chunk[2] end |
#color ⇒ Object
27 28 29 |
# File 'lib/rbcurse/core/include/chunk.rb', line 27 def color @chunk[0] end |
#text ⇒ Object
30 31 32 |
# File 'lib/rbcurse/core/include/chunk.rb', line 30 def text @chunk[1] end |