Class: CommandTower::Messaging::Accept::ExcludedDestination
- Inherits:
-
Data
- Object
- Data
- CommandTower::Messaging::Accept::ExcludedDestination
- Defined in:
- app/services/command_tower/messaging/accept/excluded_destination.rb
Instance Attribute Summary collapse
-
#destination ⇒ Object
readonly
Returns the value of attribute destination.
-
#reason_class ⇒ Object
readonly
Returns the value of attribute reason_class.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#destination ⇒ Object (readonly)
Returns the value of attribute destination
6 7 8 |
# File 'app/services/command_tower/messaging/accept/excluded_destination.rb', line 6 def destination @destination end |
#reason_class ⇒ Object (readonly)
Returns the value of attribute reason_class
6 7 8 |
# File 'app/services/command_tower/messaging/accept/excluded_destination.rb', line 6 def reason_class @reason_class end |
Class Method Details
.build(destination:, reason_class:) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'app/services/command_tower/messaging/accept/excluded_destination.rb', line 7 def self.build(destination:, reason_class:) dest = if destination == :inbox || destination.to_s == "inbox" :inbox else destination.to_s end new(destination: dest, reason_class: reason_class.to_s).freeze end |
Instance Method Details
#sort_key ⇒ Object
18 19 20 |
# File 'app/services/command_tower/messaging/accept/excluded_destination.rb', line 18 def sort_key destination == :inbox ? "inbox" : destination.to_s end |