Class: Nonnative::Strategy

Inherits:
Object
  • Object
show all
Defined in:
lib/nonnative/strategy.rb

Instance Method Summary collapse

Constructor Details

#initialize(strategy = 'before', timeout = 5) ⇒ Strategy

Returns a new instance of Strategy.



5
6
7
8
# File 'lib/nonnative/strategy.rb', line 5

def initialize(strategy = 'before', timeout = 5)
  @strategy = strategy
  @timeout = timeout
end

Instance Method Details

#timeoutObject



10
11
12
# File 'lib/nonnative/strategy.rb', line 10

def timeout
  (env_timeout || @timeout).to_i
end

#to_sObject



14
15
16
# File 'lib/nonnative/strategy.rb', line 14

def to_s
  (env_strategy || @strategy).to_s
end