Class: Expect4r::Base

Inherits:
Object
  • Object
show all
Includes:
Expect4r
Defined in:
lib/misc/base.rb

Direct Known Subclasses

BaseLoginObject, Shell

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Expect4r

#_login, #child_exit, #connected?, #exp_print, #exp_puts, #exp_send, #expect, #get_prompt, #getc, #interact, #login_by_proxy, #logout, #putc, #putcr, #read_until, #readline, #spawn

Constructor Details

#initialize(*args) ⇒ Base

Returns a new instance of Base.



15
16
17
18
19
# File 'lib/misc/base.rb', line 15

def initialize(*args)
  @matches = Set.new
  Base.add(self)
  self
end

Class Attribute Details

.routersObject (readonly)

Returns the value of attribute routers.



6
7
8
# File 'lib/misc/base.rb', line 6

def routers
  @routers
end

Class Method Details

.add(r) ⇒ Object



10
11
12
13
# File 'lib/misc/base.rb', line 10

def add(r)
  @arr ||=[]
  @arr << r
end

.allObject



7
8
9
# File 'lib/misc/base.rb', line 7

def all
  @arr || []
end