Class: JunosConfig::Application
- Inherits:
-
Object
- Object
- JunosConfig::Application
- Defined in:
- lib/junos-config/application.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
- #details ⇒ Object
-
#initialize(config, raw) ⇒ Application
constructor
A new instance of Application.
- #list_of_objects ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(config, raw) ⇒ Application
Returns a new instance of Application.
7 8 9 10 11 |
# File 'lib/junos-config/application.rb', line 7 def initialize(config, raw) @config = config @raw = raw @name = raw.match(/^\ {4}application (\S+)\ \{$/)[1] end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
3 4 5 |
# File 'lib/junos-config/application.rb', line 3 def config @config end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/junos-config/application.rb', line 3 def name @name end |
#raw ⇒ Object
Returns the value of attribute raw.
3 4 5 |
# File 'lib/junos-config/application.rb', line 3 def raw @raw end |
Instance Method Details
#details ⇒ Object
21 22 23 |
# File 'lib/junos-config/application.rb', line 21 def details "#{name}: #{raw}" end |
#list_of_objects ⇒ Object
17 18 19 |
# File 'lib/junos-config/application.rb', line 17 def list_of_objects [self] end |
#to_s ⇒ Object
13 14 15 |
# File 'lib/junos-config/application.rb', line 13 def to_s @name end |