Exception: Memoizable::MethodBuilder::BlockNotAllowedError

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/memoizable/method_builder.rb

Overview

Raised when a block is passed to a memoized method

Instance Method Summary collapse

Constructor Details

#initialize(descendant, method) ⇒ BlockNotAllowedError

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.

Initialize a block not allowed exception

Parameters:

  • descendant (Module)
  • method (Symbol)


33
34
35
# File 'lib/memoizable/method_builder.rb', line 33

def initialize(descendant, method)
  super("Cannot pass a block to #{descendant}##{method}, it is memoized")
end