Class: Phut::Syntax::VhostDirective::UnusedIpAddress
- Inherits:
-
Object
- Object
- Phut::Syntax::VhostDirective::UnusedIpAddress
- Defined in:
- lib/phut/syntax/vhost_directive.rb
Overview
Generates an unused IP address
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize ⇒ UnusedIpAddress
constructor
A new instance of UnusedIpAddress.
Constructor Details
#initialize ⇒ UnusedIpAddress
Returns a new instance of UnusedIpAddress.
11 12 13 |
# File 'lib/phut/syntax/vhost_directive.rb', line 11 def initialize @index = 0 end |
Instance Method Details
#generate ⇒ Object
15 16 17 18 |
# File 'lib/phut/syntax/vhost_directive.rb', line 15 def generate @index += 1 "192.168.0.#{@index}" end |