Class: RangeScan::Range
- Inherits:
-
Object
- Object
- RangeScan::Range
- Defined in:
- lib/rangescan/range.rb
Instance Attribute Summary collapse
-
#ip_with_subnet_mask ⇒ Object
readonly
Returns the value of attribute ip_with_subnet_mask.
Instance Method Summary collapse
-
#initialize(ip_with_subnet_mask) ⇒ Range
constructor
A new instance of Range.
- #to_a ⇒ Object
Constructor Details
#initialize(ip_with_subnet_mask) ⇒ Range
Returns a new instance of Range.
9 10 11 |
# File 'lib/rangescan/range.rb', line 9 def initialize(ip_with_subnet_mask) @ip_with_subnet_mask = IPAddress::IPv4.new(ip_with_subnet_mask) end |
Instance Attribute Details
#ip_with_subnet_mask ⇒ Object (readonly)
Returns the value of attribute ip_with_subnet_mask.
7 8 9 |
# File 'lib/rangescan/range.rb', line 7 def ip_with_subnet_mask @ip_with_subnet_mask end |
Instance Method Details
#to_a ⇒ Object
13 14 15 |
# File 'lib/rangescan/range.rb', line 13 def to_a ip_with_subnet_mask.to_a.map(&:to_s) end |