Class: Mdm::Enrollment::Client

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/mdm/enrollment/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#authenticatedObject (readonly)

Returns the value of attribute authenticated.



9
10
11
# File 'lib/mdm/enrollment/client.rb', line 9

def authenticated
  @authenticated
end

#responseObject (readonly)

Returns the value of attribute response.



9
10
11
# File 'lib/mdm/enrollment/client.rb', line 9

def response
  @response
end

Instance Method Details

#authenticate!Object



25
26
27
# File 'lib/mdm/enrollment/client.rb', line 25

def authenticate!
  @authenticated = true
end

#extract_from_response(*attributes) ⇒ Object



29
30
31
32
33
# File 'lib/mdm/enrollment/client.rb', line 29

def extract_from_response(*attributes)
  return [] if response.nil?
  attributes.map { |attribute|
    response[attribute] }
end