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.



307
308
309
310
311
# File 'lib/sup/message_chunks.rb', line 307

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

Instance Attribute Details

#linesObject (readonly)

Returns the value of attribute lines.



305
306
307
# File 'lib/sup/message_chunks.rb', line 305

def lines
  @lines
end

#patina_textObject (readonly)

Returns the value of attribute patina_text.



305
306
307
# File 'lib/sup/message_chunks.rb', line 305

def patina_text
  @patina_text
end

#statusObject (readonly)

Returns the value of attribute status.



305
306
307
# File 'lib/sup/message_chunks.rb', line 305

def status
  @status
end

Instance Method Details

#colorObject



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

def color; patina_color end

#expandable?Boolean

Returns:

  • (Boolean)


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

def expandable?; !@lines.empty? end

#inlineable?Boolean

Returns:

  • (Boolean)


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

def inlineable?; false end

#patina_colorObject



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

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)


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

def quotable?; false end

#viewable?Boolean

Returns:

  • (Boolean)


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

def viewable?; false end