Class: ExpoNotifier::Mapper::Base Abstract
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- ExpoNotifier::Mapper::Base
- Includes:
- Shale::Builder
- Defined in:
- lib/expo_notifier/mapper/base.rb
Overview
This class is abstract.
An abstract mapper class.
Direct Known Subclasses
Error, PushMessage, PushMessages, PushReceipt, PushReceiptErrorDetails, PushReceiptIds, PushReceipts, PushTicket, PushTicketErrorDetails, PushTickets, RichContent
Class Method Summary collapse
-
.attribute(name, *args, as: nil, **kwargs, &block) ⇒ Object
: (Symbol, *Object, ?as: String?, **Object) ?{ -> void } -> void.
- .orig_attribute ⇒ Object
Class Method Details
.attribute(name, *args, as: nil, **kwargs, &block) ⇒ Object
: (Symbol, *Object, ?as: String?, **Object) ?{ -> void } -> void
19 20 21 22 23 24 25 |
# File 'lib/expo_notifier/mapper/base.rb', line 19 def attribute(name, *args, as: nil, **kwargs, &block) json_mapping.finalize! unless json_mapping.finalized? T.unsafe(self).orig_attribute(name, *args, **kwargs, &block) # rubocop:disable Sorbet/ForbidTUnsafe as ||= name.to_s.camelize(:lower) json_mapping.map(as, to: name) end |
.orig_attribute ⇒ Object
16 |
# File 'lib/expo_notifier/mapper/base.rb', line 16 alias orig_attribute attribute |