Class: Redwood::Chunk::Text
Instance Attribute Summary collapse
-
#lines ⇒ Object
readonly
Returns the value of attribute lines.
Instance Method Summary collapse
- #color ⇒ Object
- #expandable? ⇒ Boolean
- #indexable? ⇒ Boolean
-
#initialize(lines) ⇒ Text
constructor
A new instance of Text.
- #inlineable? ⇒ Boolean
- #quotable? ⇒ Boolean
- #viewable? ⇒ Boolean
Constructor Details
#initialize(lines) ⇒ Text
Returns a new instance of Text.
211 212 213 214 215 |
# File 'lib/sup/message_chunks.rb', line 211 def initialize lines @lines = lines ## trim off all empty lines except one @lines.pop while @lines.length > 1 && @lines[-1] =~ /^\s*$/ && @lines[-2] =~ /^\s*$/ end |
Instance Attribute Details
#lines ⇒ Object (readonly)
Returns the value of attribute lines.
210 211 212 |
# File 'lib/sup/message_chunks.rb', line 210 def lines @lines end |
Instance Method Details
#color ⇒ Object
222 |
# File 'lib/sup/message_chunks.rb', line 222 def color; :text_color end |
#expandable? ⇒ Boolean
219 |
# File 'lib/sup/message_chunks.rb', line 219 def ; false end |
#indexable? ⇒ Boolean
220 |
# File 'lib/sup/message_chunks.rb', line 220 def indexable?; true end |
#inlineable? ⇒ Boolean
217 |
# File 'lib/sup/message_chunks.rb', line 217 def inlineable?; true end |
#quotable? ⇒ Boolean
218 |
# File 'lib/sup/message_chunks.rb', line 218 def quotable?; true end |
#viewable? ⇒ Boolean
221 |
# File 'lib/sup/message_chunks.rb', line 221 def viewable?; false end |