Class: Pwush::Message
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Pwush::Message
- Defined in:
- lib/pwush/message.rb
Constant Summary collapse
- Platforms =
1 - iOS; 2 - BB; 3 - Android; 5 - Windows Phone; 7 - OS X; 8 - Windows 8; 9 - Amazon; 10 - Safari; 11 - Chrome; 12 - Firefox; ignored if “devices” < 10
Types::Strict::Integer.enum(1, 2, 3, 5, 7, 8, 9, 10, 11, 12)
Instance Method Summary collapse
Instance Method Details
#defined_attributes ⇒ Object
314 315 316 |
# File 'lib/pwush/message.rb', line 314 def defined_attributes __attributes__.reject { |_, v| v.nil? } end |
#inspect ⇒ Object
322 323 324 325 |
# File 'lib/pwush/message.rb', line 322 def inspect attrs = defined_attributes.map { |k, v| " #{k}=#{v.inspect}" }.join "#<#{self.class}#{attrs}>" end |
#to_json(options = nil) ⇒ Object
318 319 320 |
# File 'lib/pwush/message.rb', line 318 def to_json( = nil) defined_attributes.to_json() end |