albertyw/ios_config_profile

View on GitHub
lib/ios_config_profile/device/install_profile_payload.rb

Summary

Maintainability
A
15 mins
Test Coverage
A
100%
module IOSConfigProfile
  class InstallProfilePayload < Hash
    include IOSConfigProfile::BasicPayload

    attr_accessor :profile

    def initialize(profile)
      self.profile = profile
      require_attributes :profile
      merge! install_profile_payload
    end

    private

    def install_profile_payload
      {
        "RequestType" => "InstallProfile",
        "Payload" => StringIO.new(profile),
      }
    end
  end
end