Class: Pester::Environment

Inherits:
Object
  • Object
show all
Defined in:
lib/pester/environment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ Environment

Returns a new instance of Environment.



5
6
7
# File 'lib/pester/environment.rb', line 5

def initialize(opts)
  @options = opts
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/pester/environment.rb', line 9

def method_missing(name, *args, &block)
  if name.to_s.start_with?('retry') && args.empty?
    Pester.send(name, @options, &block)
  else
    super
  end
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



3
4
5
# File 'lib/pester/environment.rb', line 3

def options
  @options
end