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.



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

def initialize lines
  @lines = lines
end

Instance Attribute Details

#linesObject (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

#colorObject



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

def color; :quote_color end

#expandable?Boolean

Returns:

  • (Boolean)


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

def expandable?; !inlineable? end

#indexable?Boolean

Returns:

  • (Boolean)


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

def indexable?; expandable? end

#inlineable?Boolean

Returns:

  • (Boolean)


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

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

#patina_colorObject



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

def patina_color; :quote_patina_color end

#patina_textObject



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

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

#quotable?Boolean

Returns:

  • (Boolean)


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

def quotable?; true end

#viewable?Boolean

Returns:

  • (Boolean)


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

def viewable?; false end