Sha256: bcf6d7b782be0236e4fb8b3af24613f20791a740651ed7ff8d7feb23e5c3c4d7

Contents?: true

Size: 363 Bytes

Versions: 12

Compression:

Stored size: 363 Bytes

Contents

module TumblrWrapper::Validators
  def validate_oauth
    raise TumblrWrapper::OauthNeeded unless access_token
  end

  def validate_present(key, parameters)
    raise TumblrWrapper::MissingRequiredParameter, key unless parameters[key]
  end

  def validate_not_present(key, parameters)
    raise TumblrWrapper::InvalidParameter, key if parameters[key]
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
tumblr_wrapper-0.4.2 lib/tumblr_wrapper/validators.rb
tumblr_wrapper-0.4.1 lib/tumblr_wrapper/validators.rb
tumblr_wrapper-0.4.0 lib/tumblr_wrapper/validators.rb
tumblr_wrapper-0.3.4 lib/tumblr_wrapper/validators.rb
tumblr_wrapper-0.3.3 lib/tumblr_wrapper/validators.rb
tumblr_wrapper-0.3.2 lib/tumblr_wrapper/validators.rb
tumblr_wrapper-0.3.1 lib/tumblr_wrapper/validators.rb
tumblr_wrapper-0.3.0 lib/tumblr_wrapper/validators.rb
tumblr_wrapper-0.2.1 lib/tumblr_wrapper/validators.rb
tumblr_wrapper-0.2.0 lib/tumblr_wrapper/validators.rb
tumblr_wrapper-0.1.1 lib/tumblr_wrapper/validators.rb
tumblr_wrapper-0.1.0 lib/tumblr_wrapper/validators.rb