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.
235 236 237 238 239 |
# File 'lib/sup/message_chunks.rb', line 235 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.
234 235 236 |
# File 'lib/sup/message_chunks.rb', line 234 def lines @lines end |
Instance Method Details
#color ⇒ Object
246 |
# File 'lib/sup/message_chunks.rb', line 246 def color; :text_color end |
#expandable? ⇒ Boolean
243 |
# File 'lib/sup/message_chunks.rb', line 243 def ; false end |
#indexable? ⇒ Boolean
244 |
# File 'lib/sup/message_chunks.rb', line 244 def indexable?; true end |
#inlineable? ⇒ Boolean
241 |
# File 'lib/sup/message_chunks.rb', line 241 def inlineable?; true end |
#quotable? ⇒ Boolean
242 |
# File 'lib/sup/message_chunks.rb', line 242 def quotable?; true end |
#viewable? ⇒ Boolean
245 |
# File 'lib/sup/message_chunks.rb', line 245 def viewable?; false end |