Sha256: 395f27bc5f89f50da61231c645db9762851fe78fdea967f35944f819fca2249a
Contents?: true
Size: 521 Bytes
Versions: 58
Compression:
Stored size: 521 Bytes
Contents
module CmAdmin module Models class Alert attr_accessor :header, :body, :type, :partial, :display_if, :html_attrs def initialize(attributes = {}) set_default_values attributes.each do |key, value| send("#{key}=", value) end end def set_default_values self.header = nil self.body = nil self.type = :info self.partial = nil self.display_if = ->(_args) { true } self.html_attrs = {} end end end end
Version data entries
58 entries across 58 versions & 1 rubygems