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.



227
228
229
# File 'lib/sup/message_chunks.rb', line 227

def initialize lines
  @lines = lines
end

Instance Attribute Details

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

#colorObject



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

def color; :quote_color end

#expandable?Boolean

Returns:

  • (Boolean)


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

def expandable?; !inlineable? end

#indexable?Boolean

Returns:

  • (Boolean)


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

def indexable?; expandable? end

#inlineable?Boolean

Returns:

  • (Boolean)


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

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

#patina_colorObject



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

def patina_color; :quote_patina_color end

#patina_textObject



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

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

#quotable?Boolean

Returns:

  • (Boolean)


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

def quotable?; true end

#viewable?Boolean

Returns:

  • (Boolean)


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

def viewable?; false end