Class: MyMenu::Blockages::Detail
- Inherits:
-
Object
- Object
- MyMenu::Blockages::Detail
- Includes:
- DefaultErrorContainer, ElasticAPM::SpanHelpers, ApiHelpers
- Defined in:
- app/services/my_menu/blockages/detail.rb
Instance Attribute Summary collapse
-
#blockage_id ⇒ Object
readonly
Returns the value of attribute blockage_id.
Instance Method Summary collapse
-
#initialize(blockage_id) ⇒ Detail
constructor
A new instance of Detail.
- #show ⇒ Object
Methods included from DefaultErrorContainer
#error, #error_message_simple, #merge_errors
Methods included from ApiHelpers
#api_call, #channel, #find_mymenu_vendor_application, #get_purpose, #headers, #parse_phone_number, #parse_user_or_guest_full_name, #parsed_vendor_name, #reservation_start_at, #send_error_availability_notification_to_staff
Constructor Details
#initialize(blockage_id) ⇒ Detail
Returns a new instance of Detail.
10 11 12 |
# File 'app/services/my_menu/blockages/detail.rb', line 10 def initialize(blockage_id) @blockage_id = blockage_id end |
Instance Attribute Details
#blockage_id ⇒ Object (readonly)
Returns the value of attribute blockage_id.
8 9 10 |
# File 'app/services/my_menu/blockages/detail.rb', line 8 def blockage_id @blockage_id end |
Instance Method Details
#show ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/services/my_menu/blockages/detail.rb', line 14 def show errors.clear result = show_blockage(blockage_id) unless result.success? = result. errors.add(:base, ) return ServiceResult.new errors: errors, message: end ServiceResult.new data: result.data end |