Class: ServiceObjects::Message
- Inherits:
-
Object
- Object
- ServiceObjects::Message
- Defined in:
- lib/service_objects/message.rb
Overview
Describes messages to be returned by service objects
Class Attribute Summary collapse
-
.text ⇒ String
readonly
The text of the message.
-
.type ⇒ Symbol
readonly
The type of the message.
Class Method Summary collapse
- .initialize(type, text) ⇒ Object
-
.new(type, text) ⇒ ServiceObjects::Message
Creates the immutable message with type and text.
Class Attribute Details
.text ⇒ String (readonly)
The text of the message
27 28 29 |
# File 'lib/service_objects/message.rb', line 27 def text @text end |
.type ⇒ Symbol (readonly)
The type of the message
32 33 34 |
# File 'lib/service_objects/message.rb', line 32 def type @type end |
Class Method Details
.initialize(type, text) ⇒ Object
18 19 20 21 22 |
# File 'lib/service_objects/message.rb', line 18 def initialize(type, text) @type = type.to_sym @text = text.to_s.freeze freeze end |
.new(type, text) ⇒ ServiceObjects::Message
Creates the immutable message with type and text
|
# File 'lib/service_objects/message.rb', line 8
|