Class: CommandTower::Messaging::Inbox::BulkResult

Inherits:
Data
  • Object
show all
Defined in:
app/services/command_tower/messaging/inbox/bulk_result.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#changed_countObject (readonly)

Returns the value of attribute changed_count

Returns:

  • (Object)

    the current value of changed_count



6
7
8
# File 'app/services/command_tower/messaging/inbox/bulk_result.rb', line 6

def changed_count
  @changed_count
end

#countObject (readonly)

Returns the value of attribute count

Returns:

  • (Object)

    the current value of count



6
7
8
# File 'app/services/command_tower/messaging/inbox/bulk_result.rb', line 6

def count
  @count
end

#idsObject (readonly)

Returns the value of attribute ids

Returns:

  • (Object)

    the current value of ids



6
7
8
# File 'app/services/command_tower/messaging/inbox/bulk_result.rb', line 6

def ids
  @ids
end

Class Method Details

.build(ids:, changed_count:) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'app/services/command_tower/messaging/inbox/bulk_result.rb', line 7

def self.build(ids:, changed_count:)
  ids = Array(ids).freeze

  new(
    ids:,
    count: ids.size,
    changed_count: Integer(changed_count),
  ).freeze
end