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 45


#dynamic_sizeString (readonly)


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


#management_statusString (readonly)


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


#nameString (readonly)


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


#short_versionString (readonly)


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


#sourceSymbol (readonly)


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


#versionString (readonly)


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


Instance Method Details

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

#bundle_size_kbInteger


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

def bundle_size_kb
  size_to_kb @bundle_size if @bundle_size
end

#dynamic_size_kbInteger


78
79
80
# File 'lib/jss/api_object/management_history/mobile_device_app.rb', line 78

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?


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

def managed?
  @management_status == HIST_RAW_STATUS_MANAGED
end

#statusSymbol


53
54
55
56
57
58
59
60
61
62
# File 'lib/jss/api_object/management_history/mobile_device_app.rb', line 53

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