Class: Core::Io::List

Inherits:
Object
  • Object
show all
Includes:
Benchmarking
Defined in:
app/api/core/io/list.rb

Instance Method Summary collapse

Methods included from Benchmarking

#benchmark, registered

Constructor Details

#initialize(command, objects) ⇒ List

Returns a new instance of List


4
5
6
7
8
# File 'app/api/core/io/list.rb', line 4

def initialize(command, objects)
  @command, @container = command, command.send(:container)
  @objects = objects.map { |o| Core::Io::Registry.instance.lookup(o.class).create!(@container, o) }
  @current_page, @last_page = [1, objects.current_page].max, [1, objects.total_pages].max
end