Class: Redwood::Chunk::CryptoNotice
Instance Attribute Summary collapse
-
#lines ⇒ Object
readonly
Returns the value of attribute lines.
-
#patina_text ⇒ Object
readonly
Returns the value of attribute patina_text.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#unknown_fingerprint ⇒ Object
readonly
Returns the value of attribute unknown_fingerprint.
Instance Method Summary collapse
- #color ⇒ Object
- #expandable? ⇒ Boolean
- #indexable? ⇒ Boolean
-
#initialize(status, description, lines = [], unknown_fingerprint = nil) ⇒ CryptoNotice
constructor
A new instance of CryptoNotice.
- #inlineable? ⇒ Boolean
- #patina_color ⇒ Object
- #quotable? ⇒ Boolean
- #viewable? ⇒ Boolean
Constructor Details
#initialize(status, description, lines = [], unknown_fingerprint = nil) ⇒ CryptoNotice
Returns a new instance of CryptoNotice.
321 322 323 324 325 326 |
# File 'lib/sup/message_chunks.rb', line 321 def initialize status, description, lines=[], unknown_fingerprint=nil @status = status @patina_text = description @lines = lines @unknown_fingerprint = unknown_fingerprint end |
Instance Attribute Details
#lines ⇒ Object (readonly)
Returns the value of attribute lines.
319 320 321 |
# File 'lib/sup/message_chunks.rb', line 319 def lines @lines end |
#patina_text ⇒ Object (readonly)
Returns the value of attribute patina_text.
319 320 321 |
# File 'lib/sup/message_chunks.rb', line 319 def patina_text @patina_text end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
319 320 321 |
# File 'lib/sup/message_chunks.rb', line 319 def status @status end |
#unknown_fingerprint ⇒ Object (readonly)
Returns the value of attribute unknown_fingerprint.
319 320 321 |
# File 'lib/sup/message_chunks.rb', line 319 def unknown_fingerprint @unknown_fingerprint end |
Instance Method Details
#color ⇒ Object
336 |
# File 'lib/sup/message_chunks.rb', line 336 def color; patina_color end |
#expandable? ⇒ Boolean
340 |
# File 'lib/sup/message_chunks.rb', line 340 def ; !@lines.empty? end |
#indexable? ⇒ Boolean
341 |
# File 'lib/sup/message_chunks.rb', line 341 def indexable?; false end |
#inlineable? ⇒ Boolean
338 |
# File 'lib/sup/message_chunks.rb', line 338 def inlineable?; false end |
#patina_color ⇒ Object
328 329 330 331 332 333 334 335 |
# File 'lib/sup/message_chunks.rb', line 328 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
339 |
# File 'lib/sup/message_chunks.rb', line 339 def quotable?; false end |
#viewable? ⇒ Boolean
342 |
# File 'lib/sup/message_chunks.rb', line 342 def viewable?; false end |