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 = [], unknown_fingerprint = nil) ⇒ CryptoNotice

Returns a new instance of CryptoNotice.



312
313
314
315
316
317
# File 'lib/sup/message_chunks.rb', line 312

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

Instance Attribute Details

#linesObject (readonly)

Returns the value of attribute lines.



310
311
312
# File 'lib/sup/message_chunks.rb', line 310

def lines
  @lines
end

#patina_textObject (readonly)

Returns the value of attribute patina_text.



310
311
312
# File 'lib/sup/message_chunks.rb', line 310

def patina_text
  @patina_text
end

#statusObject (readonly)

Returns the value of attribute status.



310
311
312
# File 'lib/sup/message_chunks.rb', line 310

def status
  @status
end

#unknown_fingerprintObject (readonly)

Returns the value of attribute unknown_fingerprint.



310
311
312
# File 'lib/sup/message_chunks.rb', line 310

def unknown_fingerprint
  @unknown_fingerprint
end

Instance Method Details

#colorObject



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

def color; patina_color end

#expandable?Boolean

Returns:

  • (Boolean)


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

def expandable?; !@lines.empty? end

#indexable?Boolean

Returns:

  • (Boolean)


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

def indexable?; false end

#inlineable?Boolean

Returns:

  • (Boolean)


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

def inlineable?; false end

#patina_colorObject



319
320
321
322
323
324
325
326
# File 'lib/sup/message_chunks.rb', line 319

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

#quotable?Boolean

Returns:

  • (Boolean)


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

def quotable?; false end

#viewable?Boolean

Returns:

  • (Boolean)


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

def viewable?; false end