Sha256: 26b023fca96f56b603e1335cf00047c28f228238b861e22a498142b1f059db18
Contents?: true
Size: 509 Bytes
Versions: 4
Compression:
Stored size: 509 Bytes
Contents
module BB module FactoryDecorator module Order private def format_filters(expressions) expressions.map(&method(:format_condition)).compact end def format_condition(value) if value.is_a?(Hash) value.map do |column, sort_key| Converter::Order.convert(column, sort_key: sort_key) end.join(", ") elsif (value.is_a?(String) && !value.empty?) || value.is_a?(Symbol) value.to_s end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
b_b-0.1.3 | lib/b_b/factory_decorator/order.rb |
b_b-0.1.2 | lib/b_b/factory_decorator/order.rb |
b_b-0.1.1 | lib/b_b/factory_decorator/order.rb |
b_b-0.1.0 | lib/b_b/factory_decorator/order.rb |