Class: FiveMobilePush::Tag
- Inherits:
-
Object
- Object
- FiveMobilePush::Tag
- Defined in:
- lib/five_mobile_push/tag.rb
Instance Attribute Summary collapse
-
#device_uid ⇒ Object
Returns the value of attribute device_uid.
Instance Method Summary collapse
- #create(*tags) ⇒ Object
- #delete(*tags) ⇒ Object
-
#initialize(client, device_uid) ⇒ Tag
constructor
A new instance of Tag.
Constructor Details
#initialize(client, device_uid) ⇒ Tag
Returns a new instance of Tag.
6 7 8 9 |
# File 'lib/five_mobile_push/tag.rb', line 6 def initialize(client, device_uid) @client = client self.device_uid = device_uid end |
Instance Attribute Details
#device_uid ⇒ Object
Returns the value of attribute device_uid.
4 5 6 |
# File 'lib/five_mobile_push/tag.rb', line 4 def device_uid @device_uid end |
Instance Method Details
#create(*tags) ⇒ Object
11 12 13 |
# File 'lib/five_mobile_push/tag.rb', line 11 def create(*) @client.post(end_point(:add), :id_type => FiveMobilePush::DEFAULT_ID_TYPE, :id_value => self.device_uid, :tags => ()) end |
#delete(*tags) ⇒ Object
15 16 17 |
# File 'lib/five_mobile_push/tag.rb', line 15 def delete(*) @client.post(end_point(:delete), :id_type => FiveMobilePush::DEFAULT_ID_TYPE, :id_value => self.device_uid, :tags => ()) end |