Sha256: 718b05464364dc1d0eb2a553b786bcd8ed9213f94f99a99bb6ce8bcbed5e9ad7

Contents?: true

Size: 332 Bytes

Versions: 9

Compression:

Stored size: 332 Bytes

Contents

module Tumblr
  class Client
    module Helper
      
      def valid_options(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
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
tumblr_client-0.6.11 lib/tumblr/helpers.rb
tumblr_client-0.6.9 lib/tumblr/helpers.rb
tumblr_client-0.6.8 lib/tumblr/helpers.rb
tumblr_client_faraday_0_8-0.6.7.1 lib/tumblr/helpers.rb
tumblr_client-0.6.7 lib/tumblr/helpers.rb
tumblr_client-0.6.6 lib/tumblr/helpers.rb
tumblr_client-0.6.5 lib/tumblr/helpers.rb
tumblr_client-0.6.1 lib/tumblr/helpers.rb
tumblr_client-0.6 lib/tumblr/helpers.rb