Class: Redwood::Chunk::CryptoNotice

Inherits:
Object
  • Object
show all
Defined in:
lib/sup/message-chunks.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, description, lines = []) ⇒ CryptoNotice

Returns a new instance of CryptoNotice.



266
267
268
269
270
# File 'lib/sup/message-chunks.rb', line 266

def initialize status, description, lines=[]
  @status = status
  @patina_text = description
  @lines = lines
end

Instance Attribute Details

#linesObject (readonly)

Returns the value of attribute lines.



264
265
266
# File 'lib/sup/message-chunks.rb', line 264

def lines
  @lines
end

#patina_textObject (readonly)

Returns the value of attribute patina_text.



264
265
266
# File 'lib/sup/message-chunks.rb', line 264

def patina_text
  @patina_text
end

#statusObject (readonly)

Returns the value of attribute status.



264
265
266
# File 'lib/sup/message-chunks.rb', line 264

def status
  @status
end

Instance Method Details

#colorObject



279
# File 'lib/sup/message-chunks.rb', line 279

def color; patina_color end

#expandable?Boolean

Returns:

  • (Boolean)


283
# File 'lib/sup/message-chunks.rb', line 283

def expandable?; !@lines.empty? end

#inlineable?Boolean

Returns:

  • (Boolean)


281
# File 'lib/sup/message-chunks.rb', line 281

def inlineable?; false end

#patina_colorObject



272
273
274
275
276
277
278
# File 'lib/sup/message-chunks.rb', line 272

def patina_color
  case status
  when :valid then :cryptosig_valid_color
  when :invalid then :cryptosig_invalid_color
  else :cryptosig_unknown_color
  end
end

#quotable?Boolean

Returns:

  • (Boolean)


282
# File 'lib/sup/message-chunks.rb', line 282

def quotable?; false end

#viewable?Boolean

Returns:

  • (Boolean)


284
# File 'lib/sup/message-chunks.rb', line 284

def viewable?; false end