Method: Urbanairship::Push::Payload#style
- Defined in:
- lib/urbanairship/push/payload.rb
#style(type: required('type'), content: required('content'), title: nil, summary: nil) ⇒ Object
Android/Amazon style builder.
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 |
# File 'lib/urbanairship/push/payload.rb', line 284 def style(type: required('type'), content: required('content'), title: nil, summary: nil) fail ArgumentError, 'type must not be nil' if type.nil? mapping = { big_picture: 'big_picture', big_text: 'big_text', inbox: 'lines' } compact_helper({ type: type, mapping[type.to_sym] => content, title: title, summary: summary }) end |