Method: Vedeu::Input::Key#initialize

Defined in:
lib/vedeu/input/key.rb

#initialize(input = nil, &block) ⇒ Vedeu::Input::Key

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Vedeu::Input::Key.

Parameters:

  • input (String|Symbol) (defaults to: nil)
  • block (Proc)

Raises:



25
26
27
28
29
30
# File 'lib/vedeu/input/key.rb', line 25

def initialize(input = nil, &block)
  raise Vedeu::Error::RequiresBlock unless block_given?

  @input  = input
  @output = block
end