Class: OneSignal::Segment

Inherits:
Object
  • Object
show all
Defined in:
lib/onesignal/segment.rb

Constant Summary collapse

ALL_USERS =
'All'
ACTIVE_USERS =
'Active Users'
ENGAGED_USERS =
'Engaged Users'
INACTIVE_USERS =
'Inactive Users'
SUBSCRIBED_USERS =
'Subscribed Users'

Instance Method Summary collapse

Constructor Details

#initialize(name:) ⇒ Segment

Returns a new instance of Segment.



11
12
13
# File 'lib/onesignal/segment.rb', line 11

def initialize name:
  @name = name
end

Instance Method Details

#as_json(_options = nil) ⇒ Object



15
16
17
# File 'lib/onesignal/segment.rb', line 15

def as_json _options = nil
  @name.to_s
end

#to_sObject



19
20
21
# File 'lib/onesignal/segment.rb', line 19

def to_s
  @name.to_s
end