Sha256: dfde019dbb5c50b5ab9f6ae856329e0811d27ad72215c0fda661f9e9d8fe69e4
Contents?: true
Size: 667 Bytes
Versions: 24
Compression:
Stored size: 667 Bytes
Contents
class Rad::Html::Flash < OpenObject attr_accessor :previous_messages, :current_messages def initialize format, previous_messages = {} self.current_messages, self.previous_messages = {}, previous_messages @keep = false end def [] key key = key.to_s if keep? previous_messages[key] else current_messages[key] || previous_messages[key] end end def []= key, value current_messages[key.to_s] = value.to_s end def keep! @keep = true self end def keep? !!@keep end def messages_for_next_request if keep? current_messages else {} end end end
Version data entries
24 entries across 24 versions & 1 rubygems