Class: Stairs::Util::CLI::Collector
- Inherits:
-
Object
- Object
- Stairs::Util::CLI::Collector
- Defined in:
- lib/stairs/util/cli.rb
Instance Method Summary collapse
-
#initialize(prompt, options = {}, &block) ⇒ Collector
constructor
A new instance of Collector.
- #run ⇒ Object
Constructor Details
#initialize(prompt, options = {}, &block) ⇒ Collector
Returns a new instance of Collector.
17 18 19 20 21 |
# File 'lib/stairs/util/cli.rb', line 17 def initialize(prompt, = {}, &block) @prompt = prompt @options = .reverse_merge required: true @validator = block end |