Class: JunosConfig::Interface
- Inherits:
-
Object
- Object
- JunosConfig::Interface
- Defined in:
- lib/junos-config/interface.rb
Instance Attribute Summary collapse
-
#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) ⇒ Interface
constructor
A new instance of Interface.
Constructor Details
#initialize(config, raw) ⇒ Interface
Returns a new instance of Interface.
7 8 9 10 11 |
# File 'lib/junos-config/interface.rb', line 7 def initialize(config, raw) @config = config @raw = raw @name = raw.match(/^\ {4}(\S+)\ \{$/)[1] end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
3 4 5 |
# File 'lib/junos-config/interface.rb', line 3 def config @config end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/junos-config/interface.rb', line 3 def name @name end |
#raw ⇒ Object
Returns the value of attribute raw.
3 4 5 |
# File 'lib/junos-config/interface.rb', line 3 def raw @raw end |