Module: Messaging::Message
- Included in:
- Controls::Message::OtherMessage, Controls::Message::Read, Controls::Message::SingleAttribute, Controls::Message::SomeMessage
- Defined in:
- lib/messaging/message.rb,
lib/messaging/message/copy.rb,
lib/messaging/message/export.rb,
lib/messaging/message/follow.rb,
lib/messaging/message/import.rb,
lib/messaging/message/metadata.rb,
lib/messaging/message/transform.rb,
lib/messaging/message/sequence_accessor.rb
Defined Under Namespace
Modules: Build, Copy, Correlate, Export, Follow, Import, Info, SequenceAccessor, Transform
Classes: Metadata
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.included(cls) ⇒ Object
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/messaging/message.rb', line 3
def self.included(cls)
cls.class_exec do
include Schema::DataStructure
extend Info
extend Build
extend Copy
extend Follow
extend Correlate
const_set :Transform, Transform
attribute :id, String
attribute :metadata, Metadata, default: -> { Metadata.new }
def self.transient_attributes
[
:id,
:metadata
]
end
end
end
|
Instance Method Details
#follows?(other_message) ⇒ Boolean
35
36
37
|
# File 'lib/messaging/message.rb', line 35
def follows?(other_message)
metadata.follows?(other_message.metadata)
end
|
#message_name ⇒ Object
31
32
33
|
# File 'lib/messaging/message.rb', line 31
def message_name
self.class.message_name
end
|
#message_type ⇒ Object
27
28
29
|
# File 'lib/messaging/message.rb', line 27
def message_type
self.class.message_type
end
|