Sha256: 7e1d878687de161b724bdbf98003ef31c3fe514a8dcefebb8eca611dba7ee37d
Contents?: true
Size: 701 Bytes
Versions: 54
Compression:
Stored size: 701 Bytes
Contents
module ZTK::DSL::Core::Actions # @author Zachary Patten <zachary AT jovelabs DOT com> # @api private module Find def self.included(base) base.class_eval do base.send(:extend, ZTK::DSL::Core::Actions::Find::ClassMethods) end end # @author Zachary Patten <zachary AT jovelabs DOT com> module ClassMethods def all dataset end def find(*args) ids = [args].flatten all.select{ |data| ids.include?(data.id) } end def first(*args) if args.count == 0 all.first else find(*args).first end end def count all.count end end end end
Version data entries
54 entries across 54 versions & 1 rubygems