lib/rcap/cap_1_0/alert.rb in rcap-2.1.0 vs lib/rcap/cap_1_0/alert.rb in rcap-2.2.0

- old
+ new

@@ -122,11 +122,11 @@ # @param [Hash] alert_yaml_data # @return [RCAP::CAP_1_0::Alert] def self.from_yaml_data( alert_yaml_data ) super.tap do |alert| - alert.password = alert_yaml_data[ PASSWORD_YAML ] + alert.password = RCAP.strip_if_given( alert_yaml_data[ PASSWORD_YAML ]) end end PASSWORD_KEY = 'password' @@ -156,10 +156,10 @@ # # @param [Hash] alert_hash # @return [RCAP::CAP_1_0::Alert] def self.from_h( alert_hash ) super.tap do |alert| - alert.password = alert_hash[ PASSWORD_KEY ] + alert.password = RCAP.strip_if_given( alert_hash[ PASSWORD_KEY ]) end end end end end