Re-read the icon data for this object from the API
 Generally done after uploading a new icon via {#icon=}

 @return [void]
337761
def refresh_icon
      return nil unless @in_jss
      fresh_data = @api.get_rsrc(@rest_rsrc)[self.class::RSRC_OBJECT_KEY]
      subset_key = @self_service_data_config[:self_service_subset] ? @self_service_data_config[:self_service_subset] : :self_service

      ss_data = fresh_data[subset_key]

      icon_data = ss_data[:self_service_icon]
      @icon = JSS::Icon.new icon_data
    end
1302617
def instance_read(attr)
      getter = :"#{name}_#{attr}"
      responds = instance.respond_to?(getter)
      cached = self.instance_variable_get("@_#{getter}")
      return cached if cached
      instance.send(getter) if responds || attr.to_s == "file_name"
    end
20718
def fix_examples_data
      each_item do |ex|
        ex["name"] = ex["url"] unless ex["name"]

        unless ex["url"] =~ /^https?:\/\//
          ex["url"] = @opts.examples_base_url + ex["url"]
        end
        unless ex["icon"] =~ /^https?:\/\//
          ex["icon"] = @opts.examples_base_url + ex["icon"]
        end

        unless ex["title"]
          ex["title"] = ex["text"]
          ex.delete("text")
        end
        unless ex["description"]
          ex["description"] = ex["desc"]
          ex.delete("desc")
        end
      end
    end
536707
def prepare_app_icons(options = {})
      return unless options[:metadata_path]

      default_app_icon_path = Dir[File.join(options[:metadata_path], "app_icon.{png,jpg}")].first
      options[:app_icon] ||= default_app_icon_path if default_app_icon_path && File.exist?(default_app_icon_path)

      default_watch_icon_path = Dir[File.join(options[:metadata_path], "watch_icon.{png,jpg}")].first
      options[:apple_watch_app_icon] ||= default_watch_icon_path if default_watch_icon_path && File.exist?(default_watch_icon_path)
    end
1136314
def reload
      old_id = @id
      @id = nil

      if @data_dir
        # Read the id file from the data directory if it exists as the
        # ID for the pre-existing physical representation of this machine.
        id_file = @data_dir.join("id")
        id_content = id_file.read.strip if id_file.file?
        if !id_content.to_s.empty?
          @id = id_content
        end
      end

      if @id != old_id && @provider
        # It changed, notify the provider
        @provider.machine_id_changed
      end

      @id
    end
134526
def restore_attribute!(attr_name)
        attr_name = attr_name.to_s
        if attribute_changed?(attr_name)
          __send__("#{attr_name}=", attribute_was(attr_name))
          clear_attribute_change(attr_name)
        end
      end
510345
def readonly_attributes(*attrs)
      @readonly_attributes ||= [:created_at, :updated_at, :completed_at]
      if attrs.any?
        @readonly_attributes.map!(&:to_sym).concat(attrs).uniq!
        setup_attributes(@readonly_attributes, true)
      end
      @readonly_attributes
    end
232650
def upload_watch_icon(app_version, upload_image)
      raise "app_version is required" unless app_version
      raise "upload_image is required" unless upload_image

      du_client.upload_watch_icon(app_version, upload_image, content_provider_id, sso_token_for_image)
    end
205138
def save!
      object = self.class.name.split("::").last.downcase
      data = {}

      self.class.accessor_properties.each do |property|
        data[property] = instance_variable_get "@#{property}"
      end

      API.send("update_#{object}", @id, data)
    end
1084286
def symbolize_attributes!
      @attributes = {}.tap do |result|
        @attributes.each do |key, value|
          result[normalized_key key] = normalized_value value
        end
      end
    end
657517
function (icon) {
            var iconParts = icon.split(":");
            if (iconParts.length !== 2) {
                this.$logError(this.ICON_BADLY_FORMATTED, [icon]);
                return null;
            } else {
                var iconInfo = aria.widgets.AriaSkinInterface.getIcon(iconParts[0], iconParts[1]);
                if (!iconInfo) {
                    this.$logError(this.ICON_NOT_FOUND, [icon]);
                    return null;
                }
                return iconInfo;
            }
        }
103638
function load(icon) {
  if (cache[icon]) return cache[icon];
  return cache[icon] = fs.readFileSync(__dirname + '/public/icons/' + icon, 'base64');
}
517304
function () {
                var curState = this._currentState;
                var initialArray = this.initialArray;
                var oldValues; // map of old values
                if (curState.initialArray == initialArray && !(this._changes & this.CHANGED_INITIAL_ARRAY)) {
                    return;
                }
                if (curState.initialArray) {
                    // there was already an array, let's keep its values
                    // to keep filteredInState when old values are reused
                    oldValues = new ariaUtilsStackHashMap();
                    var oldItems = this.items;
                    var oldItemsLength = oldItems.length, oldElt;
                    for (var i = 0; i < oldItemsLength; i++) {
                        oldElt = oldItems[i];
                        oldValues.push(oldElt.value, oldElt);
                    }
                }

                if (ariaUtilsType.isObject(initialArray)) {
                    var returnedItems = this._getItemsFromMap(oldValues);
                } else {
                    var returnedItems = this._getItemsFromArray(oldValues);
                }
                if (oldValues) {
                    this._removeListenersOnItems(oldValues.removeAll());
                    oldValues.$dispose();
                }
                this.items = returnedItems.items;
                var filteredOutElements = returnedItems.filteredOutElements;
                var arrayLength = this.items.length;
                curState.initialArray = initialArray;
                curState.sortOrder = this.SORT_INITIAL;
                curState.sortName = null;
                curState.sortKeyGetter = null;
                curState.pageSize = -1;
                this.filteredInCount = arrayLength - filteredOutElements;
                this.pages = [{ // page mode disabled: only one page
                    pageIndex : 0,
                    pageNumber : 1,
                    firstItemIndex : 0,
                    lastItemIndex : arrayLength - 1,
                    firstItemNumber : arrayLength > 0 ? 1 : 0,
                    lastItemNumber : this.filteredInCount
                }];
                this._changes = this._changes & !this.CHANGED_INITIAL_ARRAY; // don't add _CHANGED_PAGE_DATA because
                // we did the job here
            }
238669
def refresh_metadata
      @cloud_app = MnoEnterprise::App.find params[:id]
      result = @cloud_app.refresh_metadata! params[:metadata_url]
      if result && result[:errors].blank?
        render :show
      else
        render json: result, status: 400
      end
    end
753480
def read(value = nil)
      clone.tap do |criteria|
        criteria.options.merge!(read: value)
      end
    end
685110
def read_theme_data
      if @theme.data_path
        #
        # show contents of "<theme>/_data/" dir being read while degugging.
        inspect_theme_data
        theme_data = ThemeDataReader.new(site).read(site.config["data_dir"])
        @site.data = Jekyll::Utils.deep_merge_hashes(theme_data, @site.data)
        #
        # show contents of merged site.data hash while debugging with
        # additional --show-data switch.
        inspect_merged_hash if site.config["show-data"] && site.config["verbose"]
      end
    end
168930
def load(attributes)
      self.class.reload_fields_definition(false)
      raise ArgumentError, "expected an attributes Hash, got #{attributes.inspect}" unless attributes.is_a?(Hash)
      @associations ||= {}
      @attributes ||= {}
      @loaded_associations = {}
      attributes.each do |key, value|
        self.send "#{key}=", value if self.respond_to?("#{key}=")
      end
      self
    end