Module: Praxis::Mapper::Resources::QueryMethods::ClassMethods

Defined in:
lib/praxis/mapper/resources/query_methods.rb

Overview

Includes some limited, but handy query methods so we can transparently use them from the resource layer, and get wrapped resources from it

Instance Method Summary collapse

Instance Method Details

#allObject



16
17
18
# File 'lib/praxis/mapper/resources/query_methods.rb', line 16

def all(...)
  QueryProxy.new(klass: self).all(...)
end

#firstObject



28
29
30
# File 'lib/praxis/mapper/resources/query_methods.rb', line 28

def first
  QueryProxy.new(klass: self).first
end

#get(args) ⇒ Object



20
21
22
# File 'lib/praxis/mapper/resources/query_methods.rb', line 20

def get(args)
  QueryProxy.new(klass: self).get(args)
end

#get!(args) ⇒ Object



24
25
26
# File 'lib/praxis/mapper/resources/query_methods.rb', line 24

def get!(args)
  QueryProxy.new(klass: self).get!(args)
end

#including(args) ⇒ Object



12
13
14
# File 'lib/praxis/mapper/resources/query_methods.rb', line 12

def including(args)
  QueryProxy.new(klass: self).including(args)
end

#lastObject



32
33
34
# File 'lib/praxis/mapper/resources/query_methods.rb', line 32

def last
  QueryProxy.new(klass: self).last
end