Module: Messaging::Controls::Batch

Defined in:
lib/messaging/controls/batch.rb

Defined Under Namespace

Modules: Messages

Class Method Summary collapse

Class Method Details

.example(id: nil) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/messaging/controls/batch.rb', line 4

def self.example(id: nil)
  values = [
    MessageStore::Controls::RandomValue.example,
    MessageStore::Controls::RandomValue.example
  ]

  batch = Messages.example(id: id)

  2.times do |i|
    batch[i].some_attribute = values[i]
  end

  return batch, values
end

.idObject



19
20
21
# File 'lib/messaging/controls/batch.rb', line 19

def self.id
  ID::Random.example
end