Class: ScripTTY::Expect::PatternHandle

Inherits:
Object
  • Object
show all
Defined in:
lib/scriptty/expect.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pattern, callback, background) ⇒ PatternHandle

Returns a new instance of PatternHandle.



473
474
475
476
477
# File 'lib/scriptty/expect.rb', line 473

def initialize(pattern, callback, background)
  @pattern = pattern
  @callback = callback
  @background = background
end

Instance Attribute Details

#callbackObject (readonly)

Returns the value of attribute callback.



471
472
473
# File 'lib/scriptty/expect.rb', line 471

def callback
  @callback
end

#patternObject (readonly)

Returns the value of attribute pattern.



470
471
472
# File 'lib/scriptty/expect.rb', line 470

def pattern
  @pattern
end

Instance Method Details

#background?Boolean

Returns:

  • (Boolean)


479
480
481
# File 'lib/scriptty/expect.rb', line 479

def background?
  @background
end