lib/ronin/address.rb in ronin-1.0.0 vs lib/ronin/address.rb in ronin-1.1.0.rc1
- old
+ new
@@ -16,17 +16,16 @@
# You should have received a copy of the GNU General Public License
# along with Ronin. If not, see <http://www.gnu.org/licenses/>.
#
require 'ronin/model'
+require 'ronin/organization'
+require 'ronin/target'
require 'dm-timestamps'
module Ronin
- autoload :Organization, 'ronin/organization'
- autoload :Target, 'ronin/target'
-
#
# A base model which represents an Internet Address, such as:
#
# * {MACAddress}
# * {IPAddress}
@@ -67,10 +66,12 @@
# @return [Address, nil]
# The found address.
#
# @since 1.0.0
#
+ # @api public
+ #
def self.[](key)
if key.kind_of?(String)
first(:address => key)
else
super(key)
@@ -83,10 +84,12 @@
# @return [String]
# The address.
#
# @since 1.0.0
#
+ # @api public
+ #
def to_s
self.address.to_s
end
#
@@ -94,9 +97,11 @@
#
# @return [String]
# The inspected address.
#
# @since 1.0.0
+ #
+ # @api public
#
def inspect
"#<#{self.class}: #{self.address}>"
end