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
-
#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.
184 185 186 187 188 |
# File 'lib/sup/message_chunks.rb', line 184 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.
183 184 185 |
# File 'lib/sup/message_chunks.rb', line 183 def lines @lines end |
Instance Method Details
#color ⇒ Object
194 |
# File 'lib/sup/message_chunks.rb', line 194 def color; :text_color end |
#expandable? ⇒ Boolean
192 |
# File 'lib/sup/message_chunks.rb', line 192 def ; false end |
#inlineable? ⇒ Boolean
190 |
# File 'lib/sup/message_chunks.rb', line 190 def inlineable?; true end |
#quotable? ⇒ Boolean
191 |
# File 'lib/sup/message_chunks.rb', line 191 def quotable?; true end |
#viewable? ⇒ Boolean
193 |
# File 'lib/sup/message_chunks.rb', line 193 def viewable?; false end |