module WhereableClause::Conjunction

Public Instance Methods

to_h() click to toggle source

Hash for AND

# File lib/whereable_clause.rb, line 23
def to_h
  return term.to_h if opt.empty?

  {
    and: [term.to_h] + opt.elements.map { |o| o.term.to_h },
  }
end