Class: JSS::ManagementHistory::MobileDeviceApp
- 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
-
#bundle_size ⇒ String
readonly
The size of the app bundle as text, e.g.
-
#dynamic_size ⇒ String
readonly
The dynamic size of the app as text, e.g.
-
#management_status ⇒ String
readonly
The raw status, used for #managed? and #status.
-
#name ⇒ String
readonly
The name of the app.
-
#short_version ⇒ String
readonly
The short_version of the app.
-
#source ⇒ Symbol
readonly
:in_house, :app_store, or :other.
-
#version ⇒ String
readonly
The version of the app.
Instance Method Summary collapse
- #[](attr) ⇒ Object included from HashLike
-
#bundle_size_kb ⇒ Integer
The size of the app bundle in kb, e.g.
-
#dynamic_size_kb ⇒ Integer
The dynamic size of the app in kb, e.g.
-
#managed? ⇒ Boolean
@return [Boolean] If :installed and :in_house, is it managed?.
-
#status ⇒ Symbol
:installed, :pending, :failed, or :unknown.
Instance Attribute Details
#bundle_size ⇒ String (readonly)
Returns The size of the app bundle as text, e.g. '28 MB'.
|
# File 'lib/jss/api_object/management_history/mobile_device_app.rb', line 69
|
#dynamic_size ⇒ String (readonly)
Returns The dynamic size of the app as text, e.g. '28 MB'.
|
# File 'lib/jss/api_object/management_history/mobile_device_app.rb', line 72
|
#management_status ⇒ String (readonly)
Returns The raw status, used for #managed? and #status.
|
# File 'lib/jss/api_object/management_history/mobile_device_app.rb', line 63
|
#name ⇒ String (readonly)
Returns the name of the app.
|
# File 'lib/jss/api_object/management_history/mobile_device_app.rb', line 54
|
#short_version ⇒ String (readonly)
Returns The short_version of the app.
|
# File 'lib/jss/api_object/management_history/mobile_device_app.rb', line 60
|
#source ⇒ Symbol (readonly)
Returns :in_house, :app_store, or :other.
|
# File 'lib/jss/api_object/management_history/mobile_device_app.rb', line 66
|
#version ⇒ String (readonly)
Returns The version of the app.
|
# File 'lib/jss/api_object/management_history/mobile_device_app.rb', line 57
|
Instance Method Details
#bundle_size_kb ⇒ Integer
Returns The size of the app bundle in kb, e.g. 29033.
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_kb ⇒ Integer
Returns The dynamic size of the app in kb, e.g. 29033.
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 |
#status ⇒ Symbol
Returns :installed, :pending, :failed, or :unknown.
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 |