class Mdm::Enrollment::Client
Attributes
authenticated[R]
response[R]
Public Instance Methods
authenticate!()
click to toggle source
# File lib/mdm/enrollment/client.rb, line 25 def authenticate! @authenticated = true end
extract_from_response(*attributes)
click to toggle source
# File lib/mdm/enrollment/client.rb, line 29 def extract_from_response(*attributes) return [] if response.nil? attributes.map { |attribute| response[attribute] } end
Private Instance Methods
inject_auth_token_if_authenticated(options = {})
click to toggle source
# File lib/mdm/enrollment/client.rb, line 37 def inject_auth_token_if_authenticated(options = {}) if authenticated (options[:headers] ||= {}) .merge!('X-ADM-Auth-Session' => Auth.token) end end