Module: Clamour::Message::ClassMethods
- Defined in:
- lib/clamour/message.rb
Instance Method Summary collapse
-
#of_type(new_value = nil) ⇒ Object
Voluntarily set message type.
-
#type ⇒ String
Message type.
Instance Method Details
#of_type(new_value = nil) ⇒ Object
Voluntarily set message type.
23 24 25 |
# File 'lib/clamour/message.rb', line 23 def of_type(new_value = nil) @type = new_value.to_s end |
#type ⇒ String
Message type. By default it is snake cased class name.
30 31 32 |
# File 'lib/clamour/message.rb', line 30 def type @type ||= ActiveSupport::Inflector.underscore(to_s).gsub('/', '.') end |