Class: Controll::Notify::Flash
- Inherits:
-
Object
- Object
- Controll::Notify::Flash
- Defined in:
- lib/controll/notify/flash.rb
Class Attribute Summary collapse
Instance Attribute Summary collapse
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
Class Method Summary collapse
- .add_types(*types) ⇒ Object (also: add_type)
Instance Method Summary collapse
-
#initialize(controller, options = {}) ⇒ Flash
constructor
A new instance of Flash.
Constructor Details
#initialize(controller, options = {}) ⇒ Flash
Returns a new instance of Flash.
6 7 8 9 |
# File 'lib/controll/notify/flash.rb', line 6 def initialize controller, = {} @controller = controller @options = if .kind_of? Hash end |
Class Attribute Details
.types ⇒ Object
22 23 24 |
# File 'lib/controll/notify/flash.rb', line 22 def types @types ||= Controll::Event.valid_types end |
Instance Attribute Details
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
4 5 6 |
# File 'lib/controll/notify/flash.rb', line 4 def controller @controller end |
Class Method Details
.add_types(*types) ⇒ Object Also known as: add_type
26 27 28 |
# File 'lib/controll/notify/flash.rb', line 26 def add_types *types @types += types if types.all? {|type| type.kind_of? Symbol} end |