Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
event_source / lib / event_source / controls / category.rb
Size: Mime:
module EventSource
  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