Class: JunosConfig::Security::Zone
- Inherits:
-
Object
- Object
- JunosConfig::Security::Zone
- Defined in:
- lib/junos-config/security/zone.rb
Instance Attribute Summary collapse
-
#address_book ⇒ Object
Returns the value of attribute address_book.
-
#config ⇒ Object
Returns the value of attribute config.
-
#name ⇒ Object
Returns the value of attribute name.
-
#raw ⇒ Object
Returns the value of attribute raw.
Instance Method Summary collapse
-
#initialize(config, raw) ⇒ Zone
constructor
A new instance of Zone.
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_book ⇒ Object
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 |
#config ⇒ Object
Returns the value of attribute config.
4 5 6 |
# File 'lib/junos-config/security/zone.rb', line 4 def config @config end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/junos-config/security/zone.rb', line 4 def name @name end |
#raw ⇒ Object
Returns the value of attribute raw.
4 5 6 |
# File 'lib/junos-config/security/zone.rb', line 4 def raw @raw end |