Sha256: 29a73fa69127c7e57d535591251790aaec59ff104bb7e9f4787b47584e564787

Contents?: true

Size: 315 Bytes

Versions: 9

Compression:

Stored size: 315 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

9 entries across 9 versions & 1 rubygems

Version Path
cloudster-2.4.0 lib/cloudster/options_manager.rb
cloudster-2.3.0 lib/cloudster/options_manager.rb
cloudster-2.2.0 lib/cloudster/options_manager.rb
cloudster-2.1.0 lib/cloudster/options_manager.rb
cloudster-2.0.0 lib/cloudster/options_manager.rb
cloudster-1.0.0 lib/cloudster/options_manager.rb
cloudster-0.0.2 lib/cloudster/options_manager.rb
cloudster-0.0.1 lib/cloudster/options_manager.rb
cloudster-0.0.0 lib/cloudster/options_manager.rb