Sha256: 7dce7f517668c0e8024f9e2afa7cbb8f6d2597b4fd197675e21c5ed29109e25e

Contents?: true

Size: 310 Bytes

Versions: 16

Compression:

Stored size: 310 Bytes

Contents

module OptionsManager
  def require_options(options, required_params)
    missing_args = []
    required_params.each do |param|
      missing_args << param.to_s if  options[param].nil?
    end
    raise ArgumentError, "Missing required argument: #{missing_args.join(',')}" unless missing_args.empty?
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
cloudster-2.17.0 lib/cloudster/options_manager.rb
cloudster-2.16.0 lib/cloudster/options_manager.rb
cloudster-2.15.0 lib/cloudster/options_manager.rb
cloudster-2.14.1 lib/cloudster/options_manager.rb
cloudster-2.14.0 lib/cloudster/options_manager.rb
cloudster-2.13.1 lib/cloudster/options_manager.rb
cloudster-2.13.0 lib/cloudster/options_manager.rb
cloudster-2.12.0 lib/cloudster/options_manager.rb
cloudster-2.11.0 lib/cloudster/options_manager.rb
cloudster-2.10.0 lib/cloudster/options_manager.rb
cloudster-2.9.0 lib/cloudster/options_manager.rb
cloudster-2.8.0 lib/cloudster/options_manager.rb
cloudster-2.7.0 lib/cloudster/options_manager.rb
cloudster-2.6.1 lib/cloudster/options_manager.rb
cloudster-2.6.0 lib/cloudster/options_manager.rb
cloudster-2.5.0 lib/cloudster/options_manager.rb