lib/fitgem/notifications.rb
def validate_subscription_type(subscription_type)
      unless subscription_type && SUBSCRIBABLE_TYPES.include?(subscription_type)
        raise Fitgem::InvalidArgumentError, "Invalid subscription type (valid values are #{SUBSCRIBABLE_TYPES.join(', ')})"
      end
      true
    end
# Ensures that the type supplied is valid
#
# @param [Symbol] subscription_type The type of subscription;
#   valid values are (:sleep, :body, :activities, :foods, and
#   :all)
# @raise [Fitgem::InvalidArgumentError] Raised if the supplied type
#   is not valid
# @return [Boolean] 
Ensures that the type supplied is valid
Ensures that the type supplied is valid
def validate_subscription_type(subscription_type)
      unless subscription_type && SUBSCRIBABLE_TYPES.include?(subscription_type)
        raise Fitgem::InvalidArgumentError, "Invalid subscription type (valid values are #{SUBSCRIBABLE_TYPES.join(', ')})"
      end
      true
    end
def validate_subscription_type ( subscription_type ) unless subscription_type && SUBSCRIBABLE_TYPES . include? ( subscription_type ) raise Fitgem :: InvalidArgumentError , "Invalid subscription type (valid values are #{SUBSCRIBABLE_TYPES.join(', ')})" end true end
Ensures that the type supplied is valid
Ensures that the type supplied is valid
None
Boolean
[Fitgem::InvalidArgumentError] Raised if the supplied type is not valid
[ Fitgem :: InvalidArgumentError ] Raised if the supplied type is not valid
subscription_type
subscription_type The type of subscription; valid values are (:sleep, :body, :activities, :foods, and :all)
subscription_type The type of subscription ; valid values are ( : sleep : body : activities : foods and : all )