Module: MessageStore::Controls::MessageData::Read
- Defined in:
- lib/message_store/controls/message_data/read.rb
Class Method Summary collapse
- .data ⇒ Object
- .example(id: nil, type: nil, data: nil, metadata: nil) ⇒ Object
- .global_position ⇒ Object
- .id ⇒ Object
- .metadata ⇒ Object
- .position ⇒ Object
- .stream_name ⇒ Object
- .time ⇒ Object
- .type ⇒ Object
Class Method Details
.data ⇒ Object
48 49 50 |
# File 'lib/message_store/controls/message_data/read.rb', line 48 def self.data MessageData.data end |
.example(id: nil, type: nil, data: nil, metadata: nil) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/message_store/controls/message_data/read.rb', line 5 def self.example(id: nil, type: nil, data: nil, metadata: nil) if id == :none id = nil else id ||= self.id end type ||= self.type if data == :none data = nil else data ||= self.data end if == :none = nil else ||= self. end = MessageStore::MessageData::Read.build .id = id .type = type .data = data . = .position = position .global_position = global_position .time = time .stream_name = stream_name end |
.global_position ⇒ Object
60 61 62 |
# File 'lib/message_store/controls/message_data/read.rb', line 60 def self.global_position 111 end |
.id ⇒ Object
40 41 42 |
# File 'lib/message_store/controls/message_data/read.rb', line 40 def self.id MessageData.id end |
.metadata ⇒ Object
52 53 54 |
# File 'lib/message_store/controls/message_data/read.rb', line 52 def self. MessageData::Metadata.data end |
.position ⇒ Object
56 57 58 |
# File 'lib/message_store/controls/message_data/read.rb', line 56 def self.position 1 end |
.stream_name ⇒ Object
68 69 70 |
# File 'lib/message_store/controls/message_data/read.rb', line 68 def self.stream_name StreamName.example end |
.time ⇒ Object
64 65 66 |
# File 'lib/message_store/controls/message_data/read.rb', line 64 def self.time Time::Raw.example end |
.type ⇒ Object
44 45 46 |
# File 'lib/message_store/controls/message_data/read.rb', line 44 def self.type MessageData.type end |