Sha256: a595a26d012d014042994d6250cff6ccfbad3159c9a272a8fe4263b88647edfa
Contents?: true
Size: 876 Bytes
Versions: 11
Compression:
Stored size: 876 Bytes
Contents
require 'urbanairship' module Urbanairship module AbTests class Variant include Urbanairship::Common include Urbanairship::Loggable attr_accessor :description, :id, :name, :push, :schedule, :weight def initialize(client: required('client')) @client = client end def payload fail ArgumentError, 'a push must be added to create a variant' if @push.nil? { 'description': description, 'id': id, 'name': name, 'push': push, 'schedule': schedule, 'weight': weight }.delete_if {|key, value| value.nil?} #this removes the nil key value pairs end end end end
Version data entries
11 entries across 11 versions & 1 rubygems