lib/twilio-ruby/rest/monitor/v1.rb in twilio-ruby-5.48.0 vs lib/twilio-ruby/rest/monitor/v1.rb in twilio-ruby-5.49.0

- old
+ new

@@ -23,28 +23,30 @@ # @param [String] sid The SID of the Alert resource to fetch. # @return [Twilio::REST::Monitor::V1::AlertContext] if sid was passed. # @return [Twilio::REST::Monitor::V1::AlertList] def alerts(sid=:unset) if sid.nil? - raise ArgumentError, 'sid cannot be nil' - elsif sid == :unset - @alerts ||= AlertList.new self + raise ArgumentError, 'sid cannot be nil' + end + if sid == :unset + @alerts ||= AlertList.new self else - AlertContext.new(self, sid) + AlertContext.new(self, sid) end end ## # @param [String] sid The SID of the Event resource to fetch. # @return [Twilio::REST::Monitor::V1::EventContext] if sid was passed. # @return [Twilio::REST::Monitor::V1::EventList] def events(sid=:unset) if sid.nil? - raise ArgumentError, 'sid cannot be nil' - elsif sid == :unset - @events ||= EventList.new self + raise ArgumentError, 'sid cannot be nil' + end + if sid == :unset + @events ||= EventList.new self else - EventContext.new(self, sid) + EventContext.new(self, sid) end end ## # Provide a user friendly representation \ No newline at end of file