module Sequel::SymbolAref
The symbol_aref extension makes Symbol#[] support Symbol, Sequel::SQL::Identifier, and Sequel::SQL::QualifiedIdentifier instances, returning appropriate Sequel::SQL::QualifiedIdentifier instances. Itβs designed as a shortcut so that instead of:
Sequel[:table][:column] # table.column
you can just write:
:table[:column] # table.column
To load the extension:
Sequel.extension :symbol_aref
There is a refinement version of this in the symbol_aref_refinement extension.
Related module: Sequel::SymbolAref
Public Instance Methods
Source
# File lib/sequel/extensions/symbol_aref.rb 23 def [](v) 24 case v 25 when Symbol, Sequel::SQL::Identifier, Sequel::SQL::QualifiedIdentifier 26 Sequel::SQL::QualifiedIdentifier.new(self, v) 27 else 28 super 29 end 30 end
Calls superclass method