lib/ruby_speech/ssml/break.rb in ruby_speech-1.0.0 vs lib/ruby_speech/ssml/break.rb in ruby_speech-1.0.1

- old
+ new

@@ -25,11 +25,11 @@ # # @raises ArgumentError if s is not one of VALID_STRENGTHS # def strength=(s) raise ArgumentError, "You must specify a valid strength (#{VALID_STRENGTHS.map(&:inspect).join ', '})" unless VALID_STRENGTHS.include? s - write_attr :strength, s + self[:strength] = s end ## # Indicates the duration of a pause to be inserted in the output in seconds or milliseconds. It follows the time value format from the Cascading Style Sheets Level 2 Recommendation [CSS2], e.g. "250ms", "3s". # @@ -44,10 +44,10 @@ # # @raises ArgumentError if t is nota positive numeric value # def time=(t) raise ArgumentError, "You must specify a valid time (positive float value in seconds)" unless t.is_a?(Numeric) && t >= 0 - write_attr :time, "#{t}s" + self[:time] = "#{t}s" end def <<(*args) raise InvalidChildError, "A Break cannot contain children" super