Class: Nonnative::Strategy
- Inherits:
-
Object
- Object
- Nonnative::Strategy
- Defined in:
- lib/nonnative/strategy.rb
Instance Method Summary collapse
-
#initialize(strategy = 'before', timeout = 5) ⇒ Strategy
constructor
A new instance of Strategy.
- #timeout ⇒ Object
- #to_s ⇒ Object
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
#timeout ⇒ Object
10 11 12 |
# File 'lib/nonnative/strategy.rb', line 10 def timeout (env_timeout || @timeout).to_i end |
#to_s ⇒ Object
14 15 16 |
# File 'lib/nonnative/strategy.rb', line 14 def to_s (env_strategy || @strategy).to_s end |