Module: ZTK::DSL::Core::Actions::Find::ClassMethods Private

Defined in:
lib/ztk/dsl/core/actions/find.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Author:

Instance Method Summary (collapse)

Instance Method Details

- (Object) all

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



16
17
18
# File 'lib/ztk/dsl/core/actions/find.rb', line 16

def all
  dataset
end

- (Object) count

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



33
34
35
# File 'lib/ztk/dsl/core/actions/find.rb', line 33

def count
  all.count
end

- (Object) find(*args)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



20
21
22
23
# File 'lib/ztk/dsl/core/actions/find.rb', line 20

def find(*args)
  ids = [args].flatten
  all.select{ |data| ids.include?(data.id) }
end

- (Object) first(*args)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



25
26
27
28
29
30
31
# File 'lib/ztk/dsl/core/actions/find.rb', line 25

def first(*args)
  if args.count == 0
    all.first
  else
    find(*args).first
  end
end