Class: Controll::Notify::Base

Inherits:
Flash
  • Object
show all
Defined in:
lib/controll/notify/base.rb

Defined Under Namespace

Modules: ClassMethods

Constant Summary collapse

Message =
Controll::Notify::Message

Instance Attribute Summary collapse

Attributes inherited from Flash

#controller

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Flash

add_types, #initialize

Constructor Details

This class inherits a constructor from Controll::Notify::Flash

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/controll/notify/base.rb', line 8

def name
  @name
end

Class Method Details

.inherited(base) ⇒ Object



16
17
18
# File 'lib/controll/notify/base.rb', line 16

def self.inherited(base)
  base.extend ClassMethods
end

Instance Method Details

#notify(name, options = {}) ⇒ Object



10
11
12
13
14
# File 'lib/controll/notify/base.rb', line 10

def notify name, options = {}      
  @options.merge! options
  @name = name
  signal message_resolver.resolve
end