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::Int.enum(1, 2, 3, 5, 7, 8, 9, 10, 11, 12)
Instance Method Summary collapse
Instance Method Details
#defined_attributes ⇒ Object
302 303 304 |
# File 'lib/pwush/message.rb', line 302 def defined_attributes __attributes__.reject { |_, v| v.nil? } end |
#inspect ⇒ Object
310 311 312 313 |
# File 'lib/pwush/message.rb', line 310 def inspect attrs = defined_attributes.map { |k, v| " #{k}=#{v.inspect}" }.join "#<#{self.class}#{attrs}>" end |
#to_json(options = nil) ⇒ Object
306 307 308 |
# File 'lib/pwush/message.rb', line 306 def to_json( = nil) defined_attributes.to_json() end |