Class: Netconf::RPC::Executor
- Inherits:
-
Object
- Object
- Netconf::RPC::Executor
- Includes:
- Standard
- Defined in:
- lib/net/netconf/rpc.rb
Overview
module: Builder
Instance Method Summary collapse
-
#initialize(trans, os_type) ⇒ Executor
constructor
A new instance of Executor.
- #method_missing(method, params = nil, attrs = nil) ⇒ Object
Methods included from Standard
#commit, #delete_config, #edit_config, #get_config, #lock, #unlock, #validate
Constructor Details
#initialize(trans, os_type) ⇒ Executor
55 56 57 58 59 60 61 62 |
# File 'lib/net/netconf/rpc.rb', line 55 def initialize( trans, os_type ) @trans = trans begin extend Netconf::RPC::const_get( os_type ) rescue NameError # no extensions available ... end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, params = nil, attrs = nil) ⇒ Object
64 65 66 |
# File 'lib/net/netconf/rpc.rb', line 64 def method_missing( method, params = nil, attrs = nil ) @trans.rpc_exec( Netconf::RPC::Builder.send( method, params, attrs )) end |