Class: JunosConfig::ApplicationSet
- Inherits:
-
Object
- Object
- JunosConfig::ApplicationSet
- Defined in:
- lib/junos-config/application.rb
Instance Attribute Summary collapse
-
#applications ⇒ Object
Returns the value of attribute applications.
-
#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) ⇒ ApplicationSet
constructor
A new instance of ApplicationSet.
- #list_of_objects ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(config, raw) ⇒ ApplicationSet
Returns a new instance of ApplicationSet.
33 34 35 36 37 38 39 40 |
# File 'lib/junos-config/application.rb', line 33 def initialize(config, raw) @config = config @raw = raw @name = raw.match(/^\ {4}application\-set (\S+)\ \{$/)[1] @applications = raw.scan(/^(\ {8}application (\S+);)$/).collect do |x| config.application(x[1]) end end |
Instance Attribute Details
#applications ⇒ Object
Returns the value of attribute applications.
28 29 30 |
# File 'lib/junos-config/application.rb', line 28 def applications @applications end |
#config ⇒ Object
Returns the value of attribute config.
28 29 30 |
# File 'lib/junos-config/application.rb', line 28 def config @config end |
#name ⇒ Object
Returns the value of attribute name.
28 29 30 |
# File 'lib/junos-config/application.rb', line 28 def name @name end |
#raw ⇒ Object
Returns the value of attribute raw.
28 29 30 |
# File 'lib/junos-config/application.rb', line 28 def raw @raw end |
Instance Method Details
#list_of_objects ⇒ Object
46 47 48 |
# File 'lib/junos-config/application.rb', line 46 def list_of_objects applications end |
#to_s ⇒ Object
42 43 44 |
# File 'lib/junos-config/application.rb', line 42 def to_s @name end |