Class: JSS::ManagementHistory::EBook

Inherits:
Object
  • Object
show all
Includes:
HashLike
Defined in:
lib/jss/api_object/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/jss/api_object/management_history/ebook.rb', line 36

#kindString (readonly)

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

Returns:

  • (String)

    ‘IBOOK’, ‘PDF’, etc..



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

#management_statusString (readonly)

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

Returns:

  • (String)

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



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

#sourceSymbol (readonly)

Returns :in_house or :ibookstore.

Returns:

  • (Symbol)

    :in_house or :ibookstore



# File 'lib/jss/api_object/management_history/ebook.rb', line 45

#titleString (readonly) Also known as: name

Returns The name of the ebook.

Returns:

  • (String)

    The name of the ebook.



31
# File 'lib/jss/api_object/management_history/ebook.rb', line 31

alias name title

#versionString (readonly)

Returns The version of the ebook.

Returns:

  • (String)

    The version of the ebook.



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

Instance Method Details

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

#managed?Boolean

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

Returns:

  • (Boolean)


63
64
65
# File 'lib/jss/api_object/management_history/ebook.rb', line 63

def managed?
  @management_status == HIST_RAW_STATUS_MANAGED
end

#statusSymbol

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

Returns:

  • (Symbol)

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



50
51
52
53
54
55
56
57
58
59
# File 'lib/jss/api_object/management_history/ebook.rb', line 50

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