Class: Redwood::Chunk::Quote

Inherits:
Object
  • Object
show all
Defined in:
lib/sup/message_chunks.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(lines) ⇒ Quote

Returns a new instance of Quote.



241
242
243
# File 'lib/sup/message_chunks.rb', line 241

def initialize lines
  @lines = lines
end

Instance Attribute Details

#linesObject (readonly)

Returns the value of attribute lines.



240
241
242
# File 'lib/sup/message_chunks.rb', line 240

def lines
  @lines
end

Instance Method Details

#colorObject



253
# File 'lib/sup/message_chunks.rb', line 253

def color; :quote_color end

#expandable?Boolean

Returns:

  • (Boolean)


247
# File 'lib/sup/message_chunks.rb', line 247

def expandable?; !inlineable? end

#indexable?Boolean

Returns:

  • (Boolean)


248
# File 'lib/sup/message_chunks.rb', line 248

def indexable?; expandable? end

#inlineable?Boolean

Returns:

  • (Boolean)


245
# File 'lib/sup/message_chunks.rb', line 245

def inlineable?; @lines.length == 1 end

#patina_colorObject



251
# File 'lib/sup/message_chunks.rb', line 251

def patina_color; :quote_patina_color end

#patina_textObject



252
# File 'lib/sup/message_chunks.rb', line 252

def patina_text; "(#{lines.length} quoted lines)" end

#quotable?Boolean

Returns:

  • (Boolean)


246
# File 'lib/sup/message_chunks.rb', line 246

def quotable?; true end

#viewable?Boolean

Returns:

  • (Boolean)


249
# File 'lib/sup/message_chunks.rb', line 249

def viewable?; false end