Class: FTest::Config::Option
- Inherits:
-
Object
- Object
- FTest::Config::Option
- Defined in:
- lib/ftest/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.
49 50 51 |
# File 'lib/ftest/config.rb', line 49 def initialize value @value = value end |
Class Method Details
.evaluate(value, &block) ⇒ Object
44 45 46 47 |
# File 'lib/ftest/config.rb', line 44 def self.evaluate value, &block instance = new value instance.fetch &block end |
Instance Method Details
#fetch ⇒ Object
53 54 55 56 |
# File 'lib/ftest/config.rb', line 53 def fetch @value = yield unless set? value end |