Class: JunosConfig::Interface

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#configObject

Returns the value of attribute config.



3
4
5
# File 'lib/junos-config/interface.rb', line 3

def config
  @config
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/junos-config/interface.rb', line 3

def name
  @name
end

#rawObject

Returns the value of attribute raw.



3
4
5
# File 'lib/junos-config/interface.rb', line 3

def raw
  @raw
end