Class: Netconf::Transport

Inherits:
Object
  • Object
show all
Defined in:
lib/sloe/common.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Transport

Returns a new instance of Transport.



47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/sloe/common.rb', line 47

def initialize(&block)
  @state = :NETCONF_CLOSED
  @os_type = @args[:os_type] || Netconf::DEFAULT_OS_TYPE

  @rpc = Netconf::RPC::Executor.new(self, @os_type, self.logging)
  @rpc_message_id = 1
  
  if block_given?
    open(&block = nil)      # do not pass this block to open()
    yield self
    close
  end
end

Instance Attribute Details

#loggingObject

Returns the value of attribute logging.



45
46
47
# File 'lib/sloe/common.rb', line 45

def logging
  @logging
end