Sha256: 0d776b814e0048e7623df5eec8660a12980ec4572e83ade30ca9982d25a2769c

Contents?: true

Size: 284 Bytes

Versions: 2

Compression:

Stored size: 284 Bytes

Contents

require "virtus"

module Ddr::Index
  class SortOrder
    include Virtus.value_object(strict: true)

    ASC = "asc"
    DESC = "desc"

    values do
      attribute :field, String
      attribute :order, String
    end

    def to_s
      [field, order].join(" ")
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ddr-models-2.4.0.rc4 lib/ddr/index/sort_order.rb
ddr-models-2.4.0.rc3 lib/ddr/index/sort_order.rb