Class: Ronin::Address
Overview
A base model which represents an Internet Address, such as:
Direct Known Subclasses
Class Method Summary (collapse)
-
+ (Address?) [](key)
Finds an address.
-
+ (Object) address(repository = nil)
The Address.
-
+ (Object) campaigns(repository = nil)
The campaigns targeting the address.
-
+ (Object) id(repository = nil)
The primary key of the Address.
-
+ (Object) organization(repository = nil)
The optional organization the host belongs to.
-
+ (Address) parse(address)
Parses the address.
-
+ (Object) targets(repository = nil)
The targets associated with the address.
-
+ (Object) type(repository = nil)
The class name of the Address.
Instance Method Summary (collapse)
-
- (Object) address
The Address.
-
- (Object) address=(value)
The Address.
-
- (Object) campaigns
The campaigns targeting the address.
-
- (Object) campaigns=(new_campaigns)
The campaigns targeting the address.
-
- (Object) id
The primary key of the Address.
-
- (Object) id=(value)
The primary key of the Address.
-
- (String) inspect
Inspects the address.
-
- (Object) organization
The optional organization the host belongs to.
-
- (Object) organization=(resource)
The optional organization the host belongs to.
-
- (Object) targets
The targets associated with the address.
-
- (Object) targets=(new_targets)
The targets associated with the address.
-
- (String) to_s
Converts the address into a string.
-
- (Object) type
The class name of the Address.
-
- (Object) type=(value)
The class name of the Address.
Methods included from Model
Class Method Details
+ (Address?) [](key)
Finds an address.
88 89 90 91 92 93 94 |
# File 'lib/ronin/address.rb', line 88 def self.[](key) if key.kind_of?(String) first(:address => key) else super(key) end end |
+ (Object) address(repository = nil)
The Address
43 44 |
# File 'lib/ronin/address.rb', line 43 property :address, String, :required => true, :unique => true |
+ (Object) campaigns(repository = nil)
The campaigns targeting the address
53 |
# File 'lib/ronin/address.rb', line 53 has 0..n, :campaigns, :through => :targets |
+ (Object) id(repository = nil)
The primary key of the Address
37 |
# File 'lib/ronin/address.rb', line 37 property :id, Serial |
+ (Object) organization(repository = nil)
The optional organization the host belongs to
47 |
# File 'lib/ronin/address.rb', line 47 belongs_to :organization, :required => false |
+ (Address) parse(address)
Parses the address.
71 72 73 |
# File 'lib/ronin/address.rb', line 71 def self.parse(address) first_or_new(:address => address) end |
+ (Object) targets(repository = nil)
The targets associated with the address
50 |
# File 'lib/ronin/address.rb', line 50 has 0..n, :targets |
+ (Object) type(repository = nil)
The class name of the Address
40 |
# File 'lib/ronin/address.rb', line 40 property :type, Discriminator, :required => true |
Instance Method Details
- (Object) address
The Address
43 44 |
# File 'lib/ronin/address.rb', line 43 property :address, String, :required => true, :unique => true |
- (Object) address=(value)
The Address
43 44 |
# File 'lib/ronin/address.rb', line 43 property :address, String, :required => true, :unique => true |
- (Object) campaigns
The campaigns targeting the address
53 |
# File 'lib/ronin/address.rb', line 53 has 0..n, :campaigns, :through => :targets |
- (Object) campaigns=(new_campaigns)
The campaigns targeting the address
53 |
# File 'lib/ronin/address.rb', line 53 has 0..n, :campaigns, :through => :targets |
- (Object) id
The primary key of the Address
37 |
# File 'lib/ronin/address.rb', line 37 property :id, Serial |
- (Object) id=(value)
The primary key of the Address
37 |
# File 'lib/ronin/address.rb', line 37 property :id, Serial |
- (String) inspect
Inspects the address.
120 121 122 |
# File 'lib/ronin/address.rb', line 120 def inspect "#<#{self.class}: #{self.address}>" end |
- (Object) organization
The optional organization the host belongs to
47 |
# File 'lib/ronin/address.rb', line 47 belongs_to :organization, :required => false |
- (Object) organization=(resource)
The optional organization the host belongs to
47 |
# File 'lib/ronin/address.rb', line 47 belongs_to :organization, :required => false |
- (Object) targets
The targets associated with the address
50 |
# File 'lib/ronin/address.rb', line 50 has 0..n, :targets |
- (Object) targets=(new_targets)
The targets associated with the address
50 |
# File 'lib/ronin/address.rb', line 50 has 0..n, :targets |
- (String) to_s
Converts the address into a string.
106 107 108 |
# File 'lib/ronin/address.rb', line 106 def to_s self.address.to_s end |
- (Object) type
The class name of the Address
40 |
# File 'lib/ronin/address.rb', line 40 property :type, Discriminator, :required => true |
- (Object) type=(value)
The class name of the Address
40 |
# File 'lib/ronin/address.rb', line 40 property :type, Discriminator, :required => true |