Sha256: 7fcdbedcd3d55ef35bc4148ecd71fd16092010f1b7f40e2043d43ffc6de8910b
Contents?: true
Size: 598 Bytes
Versions: 8
Compression:
Stored size: 598 Bytes
Contents
# frozen_string_literal: true module Lite module Query class Base attr_accessor :relation attr_reader :args class << self def call(relation = nil, **args) klass = new(relation, args) klass.call end end def initialize(relation = nil, **args) @relation = relation || default_relation @args = args end def call raise Lite::Query::NotImplementedError unless defined?(execute) execute end private def default_relation nil end end end end
Version data entries
8 entries across 8 versions & 1 rubygems