Class: Core::Io::List
- Inherits:
-
Object
- Object
- Core::Io::List
- Includes:
- Benchmarking
- Defined in:
- app/api/core/io/list.rb
Instance Method Summary collapse
-
#initialize(command, objects) ⇒ List
constructor
A new instance of List.
Methods included from Benchmarking
Constructor Details
#initialize(command, objects) ⇒ List
Returns a new instance of List.
5 6 7 8 9 |
# File 'app/api/core/io/list.rb', line 5 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 |