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