Class: Ronin::DB::URLQueryParam
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Ronin::DB::URLQueryParam
- 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
-
#id ⇒ Integer
The primary-key of the URL query param.
-
#name ⇒ URLQueryParamName
The name of the URL query param.
-
#url ⇒ URL
The URL that the query param belongs to.
-
#value ⇒ String
The value of the URL query param.
Instance Method Summary collapse
-
#to_s ⇒ String
Converts the URL query param to a String.
Methods included from Model
Instance Attribute Details
#id ⇒ Integer
The primary-key of the URL query param
39 |
# File 'lib/ronin/db/url_query_param.rb', line 39 attribute :id, :integer |
#name ⇒ URLQueryParamName
The name of the URL query param.
45 46 |
# File 'lib/ronin/db/url_query_param.rb', line 45 belongs_to :name, required: true, class_name: 'URLQueryParamName' |
#url ⇒ URL
The URL that the query param belongs to.
59 60 |
# File 'lib/ronin/db/url_query_param.rb', line 59 belongs_to :url, required: true, class_name: 'URL' |
#value ⇒ String
The value of the URL query param
53 |
# File 'lib/ronin/db/url_query_param.rb', line 53 attribute :value, :text |
Instance Method Details
#to_s ⇒ String
Converts the URL query param to a String.
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 |