Method: Cisco::RouterBgpAF#method_missing
- Defined in:
- lib/cisco_node_utils/bgp_af.rb
#method_missing(*args) ⇒ Object
Universal Getter, Default Getter, and Setter
508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 |
# File 'lib/cisco_node_utils/bgp_af.rb', line 508 def method_missing(*args) name = args[0].to_s if args.length == 1 # Getter if name =~ /^default_(.*)$/ config_get_default('bgp_af', Regexp.last_match(1)) else config_get('bgp_af', name, @get_args) end elsif args.length == 2 && name =~ /^(.*)=$/ # Setter set_args_keys(state: args[1] ? '' : 'no') config_set('bgp_af', Regexp.last_match(1), @set_args) else super end end |