File: symbol_as.rb

package info (click to toggle)
ruby-sequel 5.63.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,408 kB
  • sloc: ruby: 113,747; makefile: 3
file content (23 lines) | stat: -rw-r--r-- 527 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen-string-literal: true
#
# The symbol_as extension adds Symbol#as, for creating
# Sequel::SQL::AliasedExpression objects. It's
# designed as a shortcut so that instead of:
#
#   Sequel[:column].as(:alias)
#
# you can just write:
#
#   :column.as(:alias)
#
# To load the extension:
#
#   Sequel.extension :symbol_as
#
# If you are using Ruby 2+, and you would like to use refinements, there
# is a refinement version of this in the symbol_as_refinement extension.

# 
class Symbol
  include Sequel::SQL::AliasMethods
end