Class: Ronin::DB::URLQueryParam

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

Overview

Represents a query param that belongs to a URL.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Model

included

Instance Attribute Details

#idInteger

The primary-key of the URL query param

Returns:

  • (Integer)


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

attribute :id, :integer

#nameURLQueryParamName

The name of the URL query param.

Returns:



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

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

#urlURL

The URL that the query param belongs to.

Returns:



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

belongs_to :url, required:   true,
class_name: 'URL'

#valueString

The value of the URL query param

Returns:

  • (String)


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

attribute :value, :text

Instance Method Details

#to_sString

Converts the URL query param to a String.

Returns:

  • (String)

    The dumped URL query param.



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

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