Sha256: 089dfc2c684131cb35d1a9dc35247a27dd38d6c13c5b734e7d10748fbefc612d
Contents?: true
Size: 509 Bytes
Versions: 17
Compression:
Stored size: 509 Bytes
Contents
# frozen_string_literal: true module ThinkingSphinx module ActiveRecord class SQLBuilder::ClauseBuilder def initialize(first_element) @clauses = [first_element] end def compose(*additions) additions.each &method(:add_clause) self end def add_clause(clause) @clauses += Array(clause) end def separated(by = ', ') clauses.flatten.compact.join(by) end private attr_reader :clauses end end end
Version data entries
17 entries across 17 versions & 1 rubygems