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.
Instance Method Summary collapse
- #color ⇒ Object
- #expandable? ⇒ Boolean
-
#initialize(status, description, lines = []) ⇒ CryptoNotice
constructor
A new instance of CryptoNotice.
- #inlineable? ⇒ Boolean
- #patina_color ⇒ Object
- #quotable? ⇒ Boolean
- #viewable? ⇒ Boolean
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
#lines ⇒ Object (readonly)
Returns the value of attribute lines.
264 265 266 |
# File 'lib/sup/message-chunks.rb', line 264 def lines @lines end |
#patina_text ⇒ Object (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 |
#status ⇒ Object (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
#color ⇒ Object
279 |
# File 'lib/sup/message-chunks.rb', line 279 def color; patina_color end |
#expandable? ⇒ Boolean
283 |
# File 'lib/sup/message-chunks.rb', line 283 def ; !@lines.empty? end |
#inlineable? ⇒ Boolean
281 |
# File 'lib/sup/message-chunks.rb', line 281 def inlineable?; false end |
#patina_color ⇒ Object
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
282 |
# File 'lib/sup/message-chunks.rb', line 282 def quotable?; false end |
#viewable? ⇒ Boolean
284 |
# File 'lib/sup/message-chunks.rb', line 284 def viewable?; false end |