Class: Ronin::DB::HTTPQueryParam

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Model
Defined in:
lib/ronin/db/http_query_param.rb

Overview

Represents a query param that belongs to a HTTPRequest.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Model

included

Instance Attribute Details

#idInteger

The primary-key of the HTTP query param

Returns:

  • (Integer)


39
# File 'lib/ronin/db/http_query_param.rb', line 39

attribute :id, :integer

#nameHTTPQueryParamName

The name of the HTTP query param

Returns:



45
46
# File 'lib/ronin/db/http_query_param.rb', line 45

belongs_to :name, required:   true,
class_name: 'HTTPQueryParamName'

#requestHTTPRequest

The HTTP request which contains this HTTP query param.

Returns:



59
60
# File 'lib/ronin/db/http_query_param.rb', line 59

belongs_to :request, required:   true,
class_name: 'HTTPRequest'

#valueString

The value of the HTTP query param

Returns:

  • (String)


53
# File 'lib/ronin/db/http_query_param.rb', line 53

attribute :value, :text

Instance Method Details

#to_sString

Converts the HTTP query param to a String.

Returns:

  • (String)

    The dumped HTTP query param.



70
71
72
# File 'lib/ronin/db/http_query_param.rb', line 70

def to_s
  URI::QueryParams.dump(self.name.to_s => self.value)
end