Class: Ronin::DB::URLScheme
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Ronin::DB::URLScheme
- Includes:
- Model, Model::HasUniqueName
- Defined in:
- lib/ronin/db/url_scheme.rb
Overview
Represents a URL scheme.
Instance Attribute Summary collapse
-
#id ⇒ Integer
The primary key of the URL scheme.
-
#urls ⇒ Array<URL>
The URLs that use the scheme.
Attributes included from Model::HasUniqueName
Class Method Summary collapse
-
.ftp ⇒ URLScheme
The FTP URL Scheme.
-
.http ⇒ URLScheme
The HTTP URL Scheme.
-
.https ⇒ URLScheme
The HTTPS URL Scheme.
Methods included from Model::HasUniqueName
Methods included from Model
Instance Attribute Details
#id ⇒ Integer
The primary key of the URL scheme.
42 |
# File 'lib/ronin/db/url_scheme.rb', line 42 attribute :id, :integer |
#urls ⇒ Array<URL>
The URLs that use the scheme.
48 49 |
# File 'lib/ronin/db/url_scheme.rb', line 48 has_many :urls, class_name: 'URL', foreign_key: :scheme_id |
Class Method Details
.ftp ⇒ URLScheme
The FTP URL Scheme
74 75 76 |
# File 'lib/ronin/db/url_scheme.rb', line 74 def self.ftp where(name: 'ftp').first end |
.http ⇒ URLScheme
The HTTP URL Scheme
56 57 58 |
# File 'lib/ronin/db/url_scheme.rb', line 56 def self.http where(name: 'http').first end |
.https ⇒ URLScheme
The HTTPS URL Scheme
65 66 67 |
# File 'lib/ronin/db/url_scheme.rb', line 65 def self.https where(name: 'https').first end |