Class: MicroManager::CLI::Result
- Inherits:
-
Object
- Object
- MicroManager::CLI::Result
- Defined in:
- lib/cli/result.rb
Instance Method Summary collapse
-
#initialize(&block) ⇒ Result
constructor
A new instance of Result.
- #render ⇒ Object
Constructor Details
#initialize(&block) ⇒ Result
Returns a new instance of Result.
6 7 8 9 10 |
# File 'lib/cli/result.rb', line 6 def initialize(&block) raise ArgumentError, "A block is required" unless block_given? @render_block = block end |
Instance Method Details
#render ⇒ Object
12 13 14 |
# File 'lib/cli/result.rb', line 12 def render @render_block.call end |