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.
227 228 229 |
# File 'lib/sup/message_chunks.rb', line 227 def initialize lines @lines = lines end |
Instance Attribute Details
#lines ⇒ Object (readonly)
Returns the value of attribute lines.
226 227 228 |
# File 'lib/sup/message_chunks.rb', line 226 def lines @lines end |
Instance Method Details
#color ⇒ Object
239 |
# File 'lib/sup/message_chunks.rb', line 239 def color; :quote_color end |
#expandable? ⇒ Boolean
233 |
# File 'lib/sup/message_chunks.rb', line 233 def ; !inlineable? end |
#indexable? ⇒ Boolean
234 |
# File 'lib/sup/message_chunks.rb', line 234 def indexable?; end |
#inlineable? ⇒ Boolean
231 |
# File 'lib/sup/message_chunks.rb', line 231 def inlineable?; @lines.length == 1 end |
#patina_color ⇒ Object
237 |
# File 'lib/sup/message_chunks.rb', line 237 def patina_color; :quote_patina_color end |
#patina_text ⇒ Object
238 |
# File 'lib/sup/message_chunks.rb', line 238 def patina_text; "(#{lines.length} quoted lines)" end |
#quotable? ⇒ Boolean
232 |
# File 'lib/sup/message_chunks.rb', line 232 def quotable?; true end |
#viewable? ⇒ Boolean
235 |
# File 'lib/sup/message_chunks.rb', line 235 def viewable?; false end |