module BabySqueel
Constants
- VERSION
Public Class Methods
[](thing, **kwargs)
click to toggle source
Get a BabySqueel
table instance.
Examples¶ ↑
BabySqueel[Post] BabySqueel[:posts] BabySqueel[Post.arel_table]
# File lib/baby_squeel.rb, line 33 def [](thing, **kwargs) if thing.respond_to?(:model_name) Relation.new(thing) elsif thing.kind_of?(Arel::Table) Table.new(thing) else Table.new(Arel::Table.new(thing, **kwargs)) end end
configure() { |self| ... }
click to toggle source
Configures BabySqueel
using the given block
# File lib/baby_squeel.rb, line 15 def configure yield self end
enable_compatibility!()
click to toggle source
Turn on BabySqueel’s compatibility mode. This will make BabySqueel
act more like Squeel.
# File lib/baby_squeel.rb, line 21 def enable_compatibility! require 'baby_squeel/compat' BabySqueel::Compat.enable! end