No commit activity in last 3 years
No release in over 3 years
RequiredOptions allows you to verbosely guard methods from options you rely on when using an options hash.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 2.6
 Project Readme

RequiredOptions

DESCRIPTION

Guard your methods against those slacker options that 'forget' to come to class.

INSTALLATION

Add gem to your project.

If using bundler

gem 'required_options'

USAGE

Just declare which components of your options hash that you can't live without

def some_method_with_options(arg, opts = {})
  required_options opts, :track_name, :band_name

  # do some really smart work here
end

If a required option is not passed into the method, it will raise a MissingOptions exception that displays the forgotten option.