Class: JunosConfig::Security::Address
- Inherits:
-
Object
- Object
- JunosConfig::Security::Address
- Defined in:
- lib/junos-config/security/address.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#ip ⇒ Object
Returns the value of attribute ip.
-
#name ⇒ Object
Returns the value of attribute name.
-
#raw ⇒ Object
Returns the value of attribute raw.
Instance Method Summary collapse
-
#initialize(config, raw) ⇒ Address
constructor
A new instance of Address.
Constructor Details
#initialize(config, raw) ⇒ Address
Returns a new instance of Address.
9 10 11 12 13 14 15 |
# File 'lib/junos-config/security/address.rb', line 9 def initialize(config, raw) @config = config @raw = raw m = raw.match(/^\ {16}address (\S+)\ (\S+);/) @name = m[1] @ip = m[2] end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
4 5 6 |
# File 'lib/junos-config/security/address.rb', line 4 def config @config end |
#ip ⇒ Object
Returns the value of attribute ip.
4 5 6 |
# File 'lib/junos-config/security/address.rb', line 4 def ip @ip end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/junos-config/security/address.rb', line 4 def name @name end |
#raw ⇒ Object
Returns the value of attribute raw.
4 5 6 |
# File 'lib/junos-config/security/address.rb', line 4 def raw @raw end |