Sha256: 01cfccf5a744daf2a94373295df090e4b5753575a94a243d8164efca127cc1e5
Contents?: true
Size: 478 Bytes
Versions: 11
Compression:
Stored size: 478 Bytes
Contents
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
11 entries across 11 versions & 1 rubygems