Sha256: 3fbb8d3aa3714646dddcce6bbc5dbfdfd1aa7f06df3be181e320ef7895cbf3ed

Contents?: true

Size: 581 Bytes

Versions: 2

Compression:

Stored size: 581 Bytes

Contents

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.

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
required_options-0.6.1 README.md
required_options-0.6.0 README.md