Module: GDataPlus::Util
- Defined in:
- lib/gdata_plus/util.rb
Class Method Summary collapse
- .prepare_options(options, required_keys, optional_keys = []) ⇒ Object
- .raise_if_error(response) ⇒ Object
Class Method Details
.prepare_options(options, required_keys, optional_keys = []) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/gdata_plus/util.rb', line 7 def (, required_keys, optional_keys = []) = .symbolize_keys .assert_valid_keys(required_keys + optional_keys) required_keys.each do |key| raise ArgumentError, "#{key.inspect} option required" if [key].nil? end end |