Class: JunosConfig::Security::Zone

Inherits:
Object
  • Object
show all
Defined in:
lib/junos-config/security/zone.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config, raw) ⇒ Zone

Returns a new instance of Zone.



9
10
11
12
13
14
15
16
# File 'lib/junos-config/security/zone.rb', line 9

def initialize(config, raw)
  @config = config
  @raw    = raw
  @name   = raw.match(/^\ {8}security\-zone\ (\S+) \{$/)[1]      
  @address_book = raw.scan(/^(\ {12}address\-book\ \{$.*?^\ {12}\})$/m).collect do |x|
    Security::AddressBook.new self, x[0]
  end
end

Instance Attribute Details

#address_bookObject

Returns the value of attribute address_book.



4
5
6
# File 'lib/junos-config/security/zone.rb', line 4

def address_book
  @address_book
end

#configObject

Returns the value of attribute config.



4
5
6
# File 'lib/junos-config/security/zone.rb', line 4

def config
  @config
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/junos-config/security/zone.rb', line 4

def name
  @name
end

#rawObject

Returns the value of attribute raw.



4
5
6
# File 'lib/junos-config/security/zone.rb', line 4

def raw
  @raw
end