Class: Redwood::Chunk::Quote
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) ⇒ Quote
constructor
A new instance of Quote.
- #inlineable? ⇒ Boolean
- #patina_color ⇒ Object
- #patina_text ⇒ Object
- #quotable? ⇒ Boolean
- #viewable? ⇒ Boolean
Constructor Details
#initialize(lines) ⇒ Quote
Returns a new instance of Quote.
251 252 253 |
# File 'lib/sup/message_chunks.rb', line 251 def initialize lines @lines = lines end |
Instance Attribute Details
#lines ⇒ Object (readonly)
Returns the value of attribute lines.
250 251 252 |
# File 'lib/sup/message_chunks.rb', line 250 def lines @lines end |
Instance Method Details
#color ⇒ Object
263 |
# File 'lib/sup/message_chunks.rb', line 263 def color; :quote_color end |
#expandable? ⇒ Boolean
257 |
# File 'lib/sup/message_chunks.rb', line 257 def ; !inlineable? end |
#indexable? ⇒ Boolean
258 |
# File 'lib/sup/message_chunks.rb', line 258 def indexable?; end |
#inlineable? ⇒ Boolean
255 |
# File 'lib/sup/message_chunks.rb', line 255 def inlineable?; @lines.length == 1 end |
#patina_color ⇒ Object
261 |
# File 'lib/sup/message_chunks.rb', line 261 def patina_color; :quote_patina_color end |
#patina_text ⇒ Object
262 |
# File 'lib/sup/message_chunks.rb', line 262 def patina_text; "(#{lines.length} quoted lines)" end |
#quotable? ⇒ Boolean
256 |
# File 'lib/sup/message_chunks.rb', line 256 def quotable?; true end |
#viewable? ⇒ Boolean
259 |
# File 'lib/sup/message_chunks.rb', line 259 def viewable?; false end |