Class: Netconf::RPC::Executor

Inherits:
Object
  • Object
show all
Includes:
Standard
Defined in:
lib/net/netconf/rpc.rb

Overview

module: Builder

Instance Method Summary collapse

Methods included from Standard

#commit, #delete_config, #edit_config, #get_config, #lock, #process_args, #run_valid_or_lock_rpc, #unlock, #validate

Constructor Details

#initialize(trans, os_type) ⇒ Executor

Returns a new instance of 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