Sha256: 9afbeedf4f51d03c815040d5e08f21a43689dde13b0041563636e0c7f8d4c129

Contents?: true

Size: 364 Bytes

Versions: 2

Compression:

Stored size: 364 Bytes

Contents

require "random_gem/cli"
require "random_gem/randomizer"
require "random_gem/version"

module RandomGem
  class Error < StandardError
    def initialize(msg: nil)
      msg ||= "An unexpected error occured. Please try again later."
      super(msg)
    end
  end

  def self.pick
    Randomizer.new.perform
  rescue Randomizer::Error
    raise Error.new
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
random_gem-0.1.1 lib/random_gem.rb
random_gem-0.1.0 lib/random_gem.rb