module Fix module Helper module LetWriterHelper def let name, &block @defs = {} unless instance_variable_defined? :@defs if @defs.key? name raise IndexError, 'the given key is already present.' else @defs.update name => block end end end end end