Module: Parsed::HTTP::BasicAuth

Includes:
Base
Defined in:
lib/parsed/http/basicauth.rb

Instance Method Summary collapse

Methods included from Base

#__define_parsed_attributes_all_methods, #__define_parsed_attributes_parsed_methods, #__define_parsed_attributes_raw_methods

Instance Method Details

#http_basic_auth_attribute(name, options = {}) ⇒ Object

Defines an attribute pair to handle de/encoding HTTP Basic auth strings


Accepts default options, see Parsed:Base



12
13
14
15
16
# File 'lib/parsed/http/basicauth.rb', line 12

def http_basic_auth_attribute(name, options = {})
  __define_parsed_attributes_all_methods name, options do |raw_value|
    ::BasicAuth.parse raw_value
  end
end