Module: Tumblr::Client::Helper
- Included in:
- Tumblr::Client
- Defined in:
- lib/tumblr/helpers.rb
Instance Method Summary collapse
Instance Method Details
#valid_options(valid_opts, opts) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/tumblr/helpers.rb', line 5 def (valid_opts, opts) bad_opts = opts.select { |val| !valid_opts.include?(val) } if !bad_opts.empty? raise Exception, "Invalid options passed, Only #{valid_opts} allowed." end return true end |