Class: Jamf::ManagementHistory::Ebook

Inherits:
Object
  • Object
show all
Includes:
HashLike
Defined in:
lib/jamf/api/classic/api_objects/management_history/ebook.rb

Overview

Ebook - an app deployed to a MobileDevice

This should only be instantiated by the ManagementHistory.ebooks 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 source data if not installed)

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#authorString (readonly)

Returns The author of the ebook.

Returns:

  • (String)

    The author of the ebook.



# File 'lib/jamf/api/classic/api_objects/management_history/ebook.rb', line 61

#kindString (readonly)

Returns ‘IBOOK’, ‘PDF’, etc..

Returns:

  • (String)

    ‘IBOOK’, ‘PDF’, etc..



# File 'lib/jamf/api/classic/api_objects/management_history/ebook.rb', line 64

#management_statusString (readonly)

Returns The raw status, used for #managed? and #status.

Returns:

  • (String)

    The raw status, used for #managed? and #status



# File 'lib/jamf/api/classic/api_objects/management_history/ebook.rb', line 67

#sourceSymbol (readonly)

Returns :in_house or :ibookstore.

Returns:

  • (Symbol)

    :in_house or :ibookstore



# File 'lib/jamf/api/classic/api_objects/management_history/ebook.rb', line 70

#titleString (readonly) Also known as: name

Returns The name of the ebook.

Returns:

  • (String)

    The name of the ebook.



56
# File 'lib/jamf/api/classic/api_objects/management_history/ebook.rb', line 56

alias name title

#versionString (readonly)

Returns The version of the ebook.

Returns:

  • (String)

    The version of the ebook.



# File 'lib/jamf/api/classic/api_objects/management_history/ebook.rb', line 58

Instance Method Details

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

#managed?Boolean

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

Returns:

  • (Boolean)


88
89
90
# File 'lib/jamf/api/classic/api_objects/management_history/ebook.rb', line 88

def managed?
  @management_status == HIST_RAW_STATUS_MANAGED
end

#statusSymbol

Returns :installed, :pending, :failed, or :unknown.

Returns:

  • (Symbol)

    :installed, :pending, :failed, or :unknown



75
76
77
78
79
80
81
82
83
84
# File 'lib/jamf/api/classic/api_objects/management_history/ebook.rb', line 75

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