Serialize activity to a hash

 @note All keys are stringified (ie. there is no Symbol)

 @return [Hash] Activity hash
968602
def to_hash
      result = { }

      # id
      result['_id'] = @_id if @_id

      # timestamp
      result['at'] = @at

      # kind
      result['kind'] = kind.to_s

      # entities
      @entities.each do |entity_name, entity|
        result[entity_name.to_s] = entity.model_id
      end

      # meta
      result['meta'] = @meta.stringify_keys unless @meta.blank?

      result
    end
457234
def to_hash
            index_hash = {}
            index_hash['json_claz'] = self.class.name
            index_hash['id'] = id
            index_hash["asms_id"] = asms_id
            index_hash['name'] = name
            index_hash['components'] = components
            index_hash['tosca_type'] = tosca_type
            index_hash['policies'] = policies
            index_hash['inputs'] = inputs
            index_hash['outputs'] = outputs
            index_hash['status'] = status
            index_hash['state'] = state
            index_hash['created_at'] = created_at
            index_hash
        end
1207086
def to_hash
      pairs = instance_variables.map do |var|
        [var.to_s.delete('@'), instance_variable_get(var)]
      end
      Hash[pairs]
    end
132274
def to_h
      h = {}
      to_hash(@root_node).each do |k, v|
        key = k.terminate(false).to_string
        h[key] = v
      end
      h
    end
1314617
def to_hash
      config = { database: database, hosts: hosts }
      if username && password
        config.merge!(username: username, password: password)
      end
      config
    end
478214
def to_hash
            index_hash = Hash.new
            index_hash["json_claz"] = self.class.name
            index_hash["id"] = id
            index_hash["name"] = name
            index_hash["org_id"] = org_id
            index_hash["privatekey"] = privatekey
            index_hash["publickey"] = publickey
            index_hash["created_at"] = created_at
            index_hash
        end
784362
function serializeHash() {
      var hash = {}
      eachFormElement.apply(function (name, value) {
        if (name in hash) {
          hash[name] && !isArray(hash[name]) && (hash[name] = [hash[name]])
          hash[name].push(value)
        } else hash[name] = value
      }, arguments)
      return hash
    }
952480
def expanded
            h = Hash.new
            [:id, :email, :api_key, :name, :phone, :password,:states, :approval, :suspend,
            :registration_ip_address, :dates, :some_msg].each do |setting|
                if grouped = self.send("#{setting}").is_a?(Hash)
                    self.send("#{setting}").each {|k,v|   h[k.to_sym] = v}
                else
                    h[setting] = self.send("#{setting}")
                end
            end
            h
        end
979079
def to_hash
      {
        'url'              => url,
        'scheme'           => scheme,
        'host'             => host,
        'root_url'         => root_url,
        'title'            => title,
        'best_title'       => best_title,
        'author'           => author,
        'best_author'      => best_author,
        'description'      => description,
        'best_description' => best_description,
        'links'            => links.to_hash,
        'images'           => images.to_a,
        'charset'          => charset,
        'feed'             => feed,
        'content_type'     => content_type,
        'meta_tags'        => meta_tags,
        'favicon'          => images.favicon,
        'response'         => { 'status'  => response.status,
                                'headers' => response.headers }
      }
    end
1125820
def to_hash
      _new_hash = ::Hash.new
      set_defaults(_new_hash)

      each do |key, value|
        _new_hash[key] = convert_value(value, for: :to_hash)
      end
      _new_hash
    end
278336
def to_hash
      OPTIONS.inject({}) do |hash, option|
        hash.merge(option.to_sym => send(option))
      end
    end
755518
def hash(self):
        '''
        
        '''
        hashed = super(Pad, self).hash()
        return khash(hashed, self._pad_length, self._pad_data)
520228
def to_s
      hash = {}
      @hooks_map.each_pair do |hook_event, nested_hash|
        hash[hook_event] = {}
        nested_hash.each_pair do |name, callbacks|
          hash[hook_event][name] = callbacks
        end
      end
      hash.to_s
    end
1213887
def to_hash
            index_hash = Hash.new
            index_hash["json_claz"] = self.class.name
            index_hash["id"] = id
            index_hash["account_id"] = account_id
            index_hash["asm_id"] = asm_id
            index_hash["org_id"] = org_id
            index_hash["tosca_type"] = tosca_type
            index_hash["inputs"] = inputs
            index_hash["outputs"] = outputs
            index_hash["name"] = name
            index_hash["status"] = status
            index_hash["disk_id"] = disk_id
            index_hash["snap_id"] = snap_id
            index_hash["created_at"] = created_at
            index_hash["updated_at"] = updated_at
            index_hash["some_msg"] = some_msg
            index_hash
        end
259346
def hash(self):
        '''
        
        '''
        hashed = super(String, self).hash()
        return khash(hashed, self._max_size)
1164209
def to_hash
            index_hash = Hash.new
            index_hash['json_claz'] = self.class.name
            index_hash['id'] = id
            index_hash['org_id'] = org_id
            index_hash["account_id"] = account_id
            index_hash['name'] = name
            index_hash['cpu'] = cpu
            index_hash['ram'] = ram
            index_hash['disk'] = disk
            index_hash['regions'] = regions
            index_hash['price'] = price
            index_hash['properties'] = properties
            index_hash['category'] = category
            index_hash['status'] = status
            index_hash['created_at'] = created_at
            index_hash['updated_at'] = updated_at
            index_hash["some_msg"] = some_msg
            index_hash
        end
615631
def to_hash
            index_hash = Hash.new
            index_hash["json_claz"] = self.class.name
            index_hash["id"] = id
            index_hash["accounts_id"] = accounts_id
            index_hash["assembly_id"] = assembly_id
            index_hash["bill_type"] = bill_type
            index_hash["billing_amount"] = billing_amount
            index_hash["currency_type"] = currency_type
            index_hash["created_at"] = created_at
            index_hash
        end