lib/better_ipaddr/methods.rb in better_ipaddr-0.1.3 vs lib/better_ipaddr/methods.rb in better_ipaddr-0.1.4
- old
+ new
@@ -95,10 +95,15 @@
attr_reader :family
# Return the integer representation of the netmask.
# @return [Integer]
attr_reader :mask_addr
- alias_method :netmask, :mask_addr
+
+ # Return the string representation of the netmask.
+ # @return [String]
+ def netmask
+ self.class[mask_addr].to_s
+ end
# Return the address greater than the original address by the
# given offset.
# @param offset [Integer] the difference between the original
# address and the returned address