Class: TestRunner::Config::Option
- Inherits:
-
Object
- Object
- TestRunner::Config::Option
- Defined in:
- lib/test_runner/config.rb
Defined Under Namespace
Class Method Summary collapse
Instance Method Summary collapse
- #fetch ⇒ Object
-
#initialize(value) ⇒ Option
constructor
A new instance of Option.
- #set? ⇒ Boolean
Constructor Details
#initialize(value) ⇒ Option
Returns a new instance of Option.
51 52 53 |
# File 'lib/test_runner/config.rb', line 51 def initialize value @value = value end |
Class Method Details
.evaluate(value, &block) ⇒ Object
46 47 48 49 |
# File 'lib/test_runner/config.rb', line 46 def self.evaluate value, &block instance = new value instance.fetch &block end |
Instance Method Details
#fetch ⇒ Object
55 56 57 58 |
# File 'lib/test_runner/config.rb', line 55 def fetch @value = yield unless set? value end |