Class: RubyCurses::Chunks::Chunk
- Defined in:
- lib/rbcurse/core/include/chunk.rb
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.
22 23 24 25 26 27 |
# File 'lib/rbcurse/core/include/chunk.rb', line 22 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
20 21 22 |
# File 'lib/rbcurse/core/include/chunk.rb', line 20 def chunk @chunk end |
Instance Method Details
#attrib ⇒ Object
34 35 36 |
# File 'lib/rbcurse/core/include/chunk.rb', line 34 def attrib @chunk[2] end |
#color ⇒ Object
28 29 30 |
# File 'lib/rbcurse/core/include/chunk.rb', line 28 def color @chunk[0] end |
#text ⇒ Object
31 32 33 |
# File 'lib/rbcurse/core/include/chunk.rb', line 31 def text @chunk[1] end |