Sha256: 3a09d00f6574b4f20a949637e83390ffacff25556f0e63d22ad330b80f708665

Contents?: true

Size: 689 Bytes

Versions: 15

Compression:

Stored size: 689 Bytes

Contents

# module MessageStore
#   module Postgres
#     module Controls
#       Category = MessageStore::Controls::Category
#     end
#   end
# end


module MessageStore
  module Postgres
    module Controls
      module Category
        def self.example(category: nil, randomize_category: nil)
          if randomize_category.nil?
            if !category.nil?
              randomize_category = false
            end
          end

          randomize_category = true if randomize_category.nil?

          category ||= 'test'

          if randomize_category
            category = "#{category}#{SecureRandom.hex(16)}XX"
          end

          category
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
evt-message_store-postgres-0.7.0.1 lib/message_store/postgres/controls/category.rb
evt-message_store-postgres-0.7.0.0 lib/message_store/postgres/controls/category.rb
evt-message_store-postgres-0.6.0.2 lib/message_store/postgres/controls/category.rb
evt-message_store-postgres-0.6.0.1 lib/message_store/postgres/controls/category.rb
evt-message_store-postgres-0.6.0.0 lib/message_store/postgres/controls/category.rb
evt-message_store-postgres-0.4.2.0 lib/message_store/postgres/controls/category.rb
evt-message_store-postgres-0.4.1.0 lib/message_store/postgres/controls/category.rb
evt-message_store-postgres-0.4.0.1 lib/message_store/postgres/controls/category.rb
evt-message_store-postgres-0.4.0.0 lib/message_store/postgres/controls/category.rb
evt-message_store-postgres-0.3.0.3 lib/message_store/postgres/controls/category.rb
evt-message_store-postgres-0.3.0.2 lib/message_store/postgres/controls/category.rb
evt-message_store-postgres-0.3.0.1 lib/message_store/postgres/controls/category.rb
evt-message_store-postgres-0.3.0.0 lib/message_store/postgres/controls/category.rb
evt-message_store-postgres-0.2.0.0 lib/message_store/postgres/controls/category.rb
evt-message_store-postgres-0.1.0.0 lib/message_store/postgres/controls/category.rb