lib/supersaas-api-client/models/slot.rb in supersaas-api-client-1.1.1 vs lib/supersaas-api-client/models/slot.rb in supersaas-api-client-2.0.0

- old
+ new

@@ -1,14 +1,12 @@ +# frozen_string_literal: true + module Supersaas class Slot < BaseModel attr_accessor :count, :description, :finish, :id, :location, :name, :start, :title attr_reader :bookings def bookings=(value) - if value.is_a?(Array) - @bookings = value.map {|attributes| Supersaas::Appointment.new(attributes) } - else - @bookings = value - end + @bookings = value.is_a?(Array) ? value.map { |attributes| Supersaas::Appointment.new(attributes) } : value end end -end \ No newline at end of file +end