lib/jss/api_object/self_servable.rb in ruby-jss-1.2.6 vs lib/jss/api_object/self_servable.rb in ruby-jss-1.2.9

- old
+ new

@@ -1,7 +1,7 @@ -### Copyright 2019 Pixar +### Copyright 2020 Pixar ### ### Licensed under the Apache License, Version 2.0 (the "Apache License") ### with the following modification; you may not use this file except in ### compliance with the Apache License and the following modification to it: @@ -345,22 +345,22 @@ # @param new_val[String] the new discription # # @return [void] # def self_service_description=(new_val) - new_val.strip! + new_val = new_val.strip return if @self_service_description == new_val @self_service_description = new_val @need_to_update = true end # @param new_val[String] The display name of the item in SSvc # # @return [void] # def self_service_display_name=(new_val) - new_val.strip! + new_val = new_val.strip return nil if @self_service_dislay_name == new_val raise JSS::InvalidDataError, 'Only macOS Self Service items have display names' unless self_service_targets.include? :macos @self_service_dislay_name = new_val @need_to_update = true end @@ -370,11 +370,11 @@ # @param new_val[String] the new install button text # # @return [void] # def self_service_install_button_text=(new_val) - new_val.strip! + new_val = new_val.strip return nil if @self_service_install_button_text == new_val raise JSS::InvalidDataError, 'Only macOS Self Service Items can have custom button text' unless self_service_targets.include? :macos @self_service_install_button_text = new_val @need_to_update = true end @@ -382,11 +382,11 @@ # @param new_val[String] the new reinstall button text # # @return [void] # def self_service_reinstall_button_text=(new_val) - new_val.strip! + new_val = new_val.strip return nil if @self_service_reinstall_button_text == new_val raise JSS::InvalidDataError, 'Only macOS Self Service Items can have custom button text' unless self_service_targets.include? :macos @self_service_reinstall_button_text = new_val @need_to_update = true end @@ -530,11 +530,11 @@ # @param subj[String] The subject text for the notification # # @return [void] # def self_service_notification_subject=(subj) - subj.strip! + subj = subj.strip return if subj == @self_service_notification_subject validate_notifications_supported @self_service_notification_subject = subj @need_to_update = true end @@ -542,10 +542,10 @@ # @param msg[String] The message text for the notification # # @return [void] # def self_service_notification_message=(msg) - msg.strip! + msg = msg.strip return if msg == @self_service_notification_message validate_notifications_supported @self_service_notification_message = msg @need_to_update = true end