Class: JSS::DockItem
- Defined in:
- lib/jss/api_object/dock_item.rb,
lib/jss.rb
Overview
A Dock Item in the JSS. These are rather simple. They have an ID, name, path, type, and contents which is read-only
Constant Summary collapse
- DOCK_ITEM_TYPE =
The Dock Item type
%w[ App File Folder ].freeze
- RSRC_BASE =
The base for REST resources of this class
'dockitems'.freeze
- RSRC_LIST_KEY =
the hash key used for the JSON list output of all objects in the JSS
:dock_items
- RSRC_OBJECT_KEY =
The hash key used for the JSON object output. It's also used in various error messages
:dock_item
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Attributes.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#need_to_update ⇒ Boolean
included
from Updatable
readonly
Do we have unsaved changes?.
-
#path ⇒ Object
Returns the value of attribute path.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#clone(new_name, api: nil) ⇒ APIObject
included
from Creatable
make a clone of this API object, with a new name.
-
#create ⇒ Integer
included
from Creatable
Create a new object in the JSS.
-
#initialize(args = {}) ⇒ DockItem
constructor
Constructor.
-
#name=(newname) ⇒ void
included
from Updatable
Change the name of this item Remember to #update to push changes to the server.
-
#update ⇒ Boolean
included
from Updatable
Save changes to the JSS.
Constructor Details
#initialize(args = {}) ⇒ DockItem
Constructor
89 90 91 92 93 94 95 |
# File 'lib/jss/api_object/dock_item.rb', line 89 def initialize(args = {}) super args @type = 'App' if @init_data[:type].nil? @type = @init_data[:type] @path = @init_data[:path] end |
Instance Attribute Details
#id ⇒ Object (readonly)
Attributes
81 82 83 |
# File 'lib/jss/api_object/dock_item.rb', line 81 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
82 83 84 |
# File 'lib/jss/api_object/dock_item.rb', line 82 def name @name end |
#need_to_update ⇒ Boolean (readonly) Originally defined in module Updatable
Returns do we have unsaved changes?.
#path ⇒ Object
Returns the value of attribute path.
84 85 86 |
# File 'lib/jss/api_object/dock_item.rb', line 84 def path @path end |
#type ⇒ Object
Returns the value of attribute type.
83 84 85 |
# File 'lib/jss/api_object/dock_item.rb', line 83 def type @type end |
Instance Method Details
#clone(new_name, api: nil) ⇒ APIObject Originally defined in module Creatable
make a clone of this API object, with a new name. The class must be creatable
#create ⇒ Integer Originally defined in module Creatable
Create a new object in the JSS.
#name=(newname) ⇒ void Originally defined in module Updatable
This method returns an undefined value.
Change the name of this item Remember to #update to push changes to the server.
#update ⇒ Boolean Originally defined in module Updatable
Save changes to the JSS