Skip to content

Commit 2a5eca9

Browse files
author
José Valim
committed
Rename e to exports
1 parent f292a07 commit 2a5eca9

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

lib/iex/lib/iex/helpers.ex

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ defmodule IEx.Helpers do
5353
To list all IEx helpers available, which is effectively all
5454
exports (functions and macros) in the `IEx.Helpers` module:
5555
56-
iex> e(IEx.Helpers)
56+
iex> exports(IEx.Helpers)
5757
5858
This module also include helpers for debugging purposes, see
5959
`IEx.break!/4` for more information.
@@ -587,17 +587,14 @@ defmodule IEx.Helpers do
587587
@doc """
588588
Prints a list of all the functions and macros exported by the given module.
589589
"""
590-
def e(module \\ Kernel) do
591-
print_exports(IEx.Autocomplete.exports(module))
592-
dont_display_result()
593-
end
594-
595-
defp print_exports(functions) do
590+
def exports(module \\ Kernel) do
591+
exports = IEx.Autocomplete.exports(module)
596592
list =
597-
Enum.map(functions, fn {name, arity} ->
593+
Enum.map(exports, fn {name, arity} ->
598594
Atom.to_string(name) <> "/" <> Integer.to_string(arity)
599595
end)
600596
print_table(list)
597+
dont_display_result()
601598
end
602599

603600
@doc """

lib/iex/test/iex/helpers_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,9 +506,9 @@ defmodule IEx.HelpersTest do
506506
end
507507
end
508508

509-
describe "e" do
509+
describe "exports" do
510510
test "prints module exports" do
511-
exports = capture_io(fn -> e(IEx.Autocomplete) end)
511+
exports = capture_io(fn -> exports(IEx.Autocomplete) end)
512512
assert exports == "expand/1 expand/2 exports/1 \n"
513513
end
514514
end

0 commit comments

Comments
 (0)