Class: MicroManager::CLI::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/cli/result.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Result

Returns a new instance of Result.

Raises:

  • (ArgumentError)


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

#renderObject



12
13
14
# File 'lib/cli/result.rb', line 12

def render
  @render_block.call
end