Class: JSS::ManagementHistory::MobileDeviceApp

Inherits:
Object
  • Object
show all
Includes:
HashLike
Defined in:
lib/jss/api_object/management_history/mobile_device_app.rb

Overview

MobileDeviceApp - an app deployed to a MobileDevice

This should only be instantiated by the ManagementHistory.app_history method when mixed in to Mobile devices.

That method will return an array of these objects.

NOTE: some attributes will be nil for some statuses (e.g. no size data if not installed)

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bundle_sizeString (readonly)



# File 'lib/jss/api_object/management_history/mobile_device_app.rb', line 69

#dynamic_sizeString (readonly)



# File 'lib/jss/api_object/management_history/mobile_device_app.rb', line 72

#management_statusString (readonly)



# File 'lib/jss/api_object/management_history/mobile_device_app.rb', line 63

#nameString (readonly)



# File 'lib/jss/api_object/management_history/mobile_device_app.rb', line 54

#short_versionString (readonly)



# File 'lib/jss/api_object/management_history/mobile_device_app.rb', line 60

#sourceSymbol (readonly)



# File 'lib/jss/api_object/management_history/mobile_device_app.rb', line 66

#versionString (readonly)



# File 'lib/jss/api_object/management_history/mobile_device_app.rb', line 57

Instance Method Details

#[](attr) ⇒ Object Originally defined in module HashLike

#bundle_size_kbInteger



96
97
98
# File 'lib/jss/api_object/management_history/mobile_device_app.rb', line 96

def bundle_size_kb
  size_to_kb @bundle_size if @bundle_size
end

#dynamic_size_kbInteger



102
103
104
# File 'lib/jss/api_object/management_history/mobile_device_app.rb', line 102

def dynamic_size_kb
  size_to_kb @dynamic_size if @dynamic_size
end

#managed?Boolean

@return [Boolean] If :installed and :in_house, is it managed?



90
91
92
# File 'lib/jss/api_object/management_history/mobile_device_app.rb', line 90

def managed?
  @management_status == HIST_RAW_STATUS_MANAGED
end

#statusSymbol



77
78
79
80
81
82
83
84
85
86
# File 'lib/jss/api_object/management_history/mobile_device_app.rb', line 77

def status
  case @management_status
  when HIST_RAW_STATUS_INSTALLED then :installed
  when HIST_RAW_STATUS_MANAGED then :installed
  when HIST_RAW_STATUS_UNMANAGED then :installed
  when HIST_RAW_STATUS_PENDING then :pending
  when HIST_RAW_STATUS_FAILED then :failed
  else :unknown
  end
end