lib/thinreports/report/page.rb in thinreports-0.10.1 vs lib/thinreports/report/page.rb in thinreports-0.10.2

- old
+ new

@@ -62,33 +62,28 @@ # @return [Boolean] (false) def blank? false end - # rubocop:disable Metrics/AbcSize def copy new_page = self.class.new(report, layout, count: count?) manager.shapes.each do |id, shape| new_shape = shape.copy(new_page) new_page.manager.shapes[id] = new_shape - if new_shape.internal.type_of?(Core::Shape::List::TYPE_NAME) - new_page.manager.lists[id] = new_shape - end + new_page.manager.lists[id] = new_shape if new_shape.internal.type_of?(Core::Shape::List::TYPE_NAME) end new_page end # @param [Hash] options # @option options [:create, :copy] :at (:create) def finalize(options = {}) at = options[:at] || :create # For list shapes. - if at == :create - manager.lists.each_value { |list| list.manager.finalize } - end + manager.lists.each_value { |list| list.manager.finalize } if at == :create @finalized = true end def finalized?