module WhereableClause::Disjunction

Public Instance Methods

to_h() click to toggle source

Hash for OR

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

  {
    or: [conjunction.to_h] + opt.elements.map { |o| o.conjunction.to_h },
  }
end