Module: RJR::HasMessages

Defined in:
lib/rjr/util/has_messages.rb

Overview

Mixin adding methods allowing developer to define performatted messages on a class. After they are defined they may be retrieved, manipulated, and sent to the server at any time

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



12
13
14
# File 'lib/rjr/util/has_messages.rb', line 12

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

Instance Method Details

#define_message(name, &bl) ⇒ Object

Wrapper around HasMessages#message



17
18
19
# File 'lib/rjr/util/has_messages.rb', line 17

def define_message(name, &bl)
  self.class.message(name, bl.call)
end