{"action":"created","comment":{"url":"https://api.github.com/repos/elixirschool/elixirschool/pulls/comments/150947780","pull_request_review_id":76576359,"id":150947780,"diff_hunk":"@@ -0,0 +1,309 @@\n+---\n+version: 1.0.1\n+title: Documentación\n+redirect_from:\n+  - /lessons/basics/documentation/\n+---\n+\n+Documentando código Elixir.\n+\n+{% include toc.html %}\n+\n+## Anotación\n+\n+Cuanto documentamos y qué hace que la documentación de calidad siga siendo un tema polémico dentro del mundo de la programación. Sin embargo, todos podemos estar deacuerdo que la documentación es importante para nosotros y para aquellos que trabajan con nuestro código.\n+\n+Elixir trata la documentación como *ciudadanos de primera clase*, ofreciendo varias funciones para acceder y generar documentación para tus proyectos. El núcleo de Elixir nos provee con diferentes atributos para documentar el código. Vamos a ver 3 formas:\n+\n+  - `#` - Para documentación en linea.\n+  - `@moduledoc` - Para documentación a nivel de módulo.\n+  - `@doc` - Para documentación a nivel de función.\n+\n+### Documentación en linea\n+\n+Probablemente la forma mas simple de comentar tu código es con comentarios en linea. Similar a Ruby o Python, el comentario en linea de Elixir esta denotado con `#`, frecuentemente conocido como *almohadilla* o de alguna otra forma de acuerdo de donde seas.\n+\n+Toma este script de Elixir (greeting.exs):\n+\n+```elixir\n+# Outputs 'Hello, chum.' to the console.\n+IO.puts \"Hello, \" <> \"chum.\"\n+```\n+\n+Elixir, cuando ejecuta este script ignorará todo desde `#` hasta el final de la linea, tratandolo como datos sin uso. Esto puede no agregar valor a la operación o rendimiento del script, sin embargo cuando no es obvio que esta pasando, un programador debería saberlo leyendo tu comentario. ¡Se consciente de no abusar del comentario en linea! Ensuciar un código puede volverse una pesadilla para algunos. Es mejor usarlo con moderación.\n+\n+### Documentando Módulos\n+\n+El anotador `@moduledoc` permite agregar documentación al nivel de módulo. Esto tipicamente se situa bajo la declaración `defmodule` al inicio del archivo. El ejemplo a continuación muestra un comentario de una linea dentro del decorador `@moduledoc`.\n+\n+```elixir\n+defmodule Greeter do\n+  @moduledoc \"\"\"\n+  Provides a function `hello/1` to greet a human\n+  \"\"\"\n+\n+  def hello(name) do\n+    \"Hello, \" <> name\n+  end\n+end\n+```\n+\n+Nosotros (u otros) podemos acceder a esta documentación usando la función de ayuda `h` dentro de IEx. \n+\n+```elixir\n+iex> c(\"greeter.ex\")\n+[Greeter]\n+\n+iex> h Greeter\n+\n+                Greeter\n+\n+Provides a function hello/1 to greet a human\n+```\n+\n+### Documentando Funciones\n+\n+Al igual que Elixir nos da la habilidad para documentar a nivel de módulo, también habilita similares anotaciones para documentar funciones. El anotador `@doc` permite agregar documentación a nivel de función. El anotador `@doc` se situa justo sobre la función que esta comentando.\n+\n+```elixir\n+defmodule Greeter do\n+  @moduledoc \"\"\"\n+  ...\n+  \"\"\"\n+\n+  @doc \"\"\"\n+  Prints a hello message\n+\n+  ## Parameters\n+\n+    - name: String that represents the name of the person.\n+\n+  ## Examples\n+\n+      iex> Greeter.hello(\"Sean\")\n+      \"Hello, Sean\"\n+\n+      iex> Greeter.hello(\"pete\")\n+      \"Hello, pete\"\n+\n+  \"\"\"","path":"es/lessons/basics/documentation.md","position":89,"original_position":89,"commit_id":"62c940f5850e420da16841ba09b022a8d6d5b4f5","original_commit_id":"1d255d291b6cef8cbbad992c2b8da819251762e1","user":{"login":"erickgnavar","id":862022,"avatar_url":"https://avatars3.githubusercontent.com/u/862022?v=4","gravatar_id":"","url":"https://api.github.com/users/erickgnavar","html_url":"https://github.com/erickgnavar","followers_url":"https://api.github.com/users/erickgnavar/followers","following_url":"https://api.github.com/users/erickgnavar/following{/other_user}","gists_url":"https://api.github.com/users/erickgnavar/gists{/gist_id}","starred_url":"https://api.github.com/users/erickgnavar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erickgnavar/subscriptions","organizations_url":"https://api.github.com/users/erickgnavar/orgs","repos_url":"https://api.github.com/users/erickgnavar/repos","events_url":"https://api.github.com/users/erickgnavar/events{/privacy}","received_events_url":"https://api.github.com/users/erickgnavar/received_events","type":"User","site_admin":false},"body":"Good point, @doomspork what do you think about that? this is not documented in the wiki, maybe it should be added?","created_at":"2017-11-14T20:03:48Z","updated_at":"2017-11-14T20:03:48Z","html_url":"https://github.com/elixirschool/elixirschool/pull/1218#discussion_r150947780","pull_request_url":"https://api.github.com/repos/elixirschool/elixirschool/pulls/1218","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/elixirschool/elixirschool/pulls/comments/150947780"},"html":{"href":"https://github.com/elixirschool/elixirschool/pull/1218#discussion_r150947780"},"pull_request":{"href":"https://api.github.com/repos/elixirschool/elixirschool/pulls/1218"}},"in_reply_to_id":145565394},"pull_request":{"url":"https://api.github.com/repos/elixirschool/elixirschool/pulls/1218","id":146654369,"html_url":"https://github.com/elixirschool/elixirschool/pull/1218","diff_url":"https://github.com/elixirschool/elixirschool/pull/1218.diff","patch_url":"https://github.com/elixirschool/elixirschool/pull/1218.patch","issue_url":"https://api.github.com/repos/elixirschool/elixirschool/issues/1218","number":1218,"state":"closed","locked":false,"title":"[ES] Add documentation lesson in spanish","user":{"login":"erickgnavar","id":862022,"avatar_url":"https://avatars3.githubusercontent.com/u/862022?v=4","gravatar_id":"","url":"https://api.github.com/users/erickgnavar","html_url":"https://github.com/erickgnavar","followers_url":"https://api.github.com/users/erickgnavar/followers","following_url":"https://api.github.com/users/erickgnavar/following{/other_user}","gists_url":"https://api.github.com/users/erickgnavar/gists{/gist_id}","starred_url":"https://api.github.com/users/erickgnavar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erickgnavar/subscriptions","organizations_url":"https://api.github.com/users/erickgnavar/orgs","repos_url":"https://api.github.com/users/erickgnavar/repos","events_url":"https://api.github.com/users/erickgnavar/events{/privacy}","received_events_url":"https://api.github.com/users/erickgnavar/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-10-15T15:21:49Z","updated_at":"2017-11-14T20:03:48Z","closed_at":"2017-11-12T20:55:49Z","merged_at":"2017-11-12T20:55:49Z","merge_commit_sha":"49fb713fc2997c30d054afabed4b3480d4e2e53d","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/elixirschool/elixirschool/pulls/1218/commits","review_comments_url":"https://api.github.com/repos/elixirschool/elixirschool/pulls/1218/comments","review_comment_url":"https://api.github.com/repos/elixirschool/elixirschool/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elixirschool/elixirschool/issues/1218/comments","statuses_url":"https://api.github.com/repos/elixirschool/elixirschool/statuses/62c940f5850e420da16841ba09b022a8d6d5b4f5","head":{"label":"erickgnavar:master","ref":"master","sha":"62c940f5850e420da16841ba09b022a8d6d5b4f5","user":{"login":"erickgnavar","id":862022,"avatar_url":"https://avatars3.githubusercontent.com/u/862022?v=4","gravatar_id":"","url":"https://api.github.com/users/erickgnavar","html_url":"https://github.com/erickgnavar","followers_url":"https://api.github.com/users/erickgnavar/followers","following_url":"https://api.github.com/users/erickgnavar/following{/other_user}","gists_url":"https://api.github.com/users/erickgnavar/gists{/gist_id}","starred_url":"https://api.github.com/users/erickgnavar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erickgnavar/subscriptions","organizations_url":"https://api.github.com/users/erickgnavar/orgs","repos_url":"https://api.github.com/users/erickgnavar/repos","events_url":"https://api.github.com/users/erickgnavar/events{/privacy}","received_events_url":"https://api.github.com/users/erickgnavar/received_events","type":"User","site_admin":false},"repo":{"id":47090675,"name":"elixir-school","full_name":"erickgnavar/elixir-school","owner":{"login":"erickgnavar","id":862022,"avatar_url":"https://avatars3.githubusercontent.com/u/862022?v=4","gravatar_id":"","url":"https://api.github.com/users/erickgnavar","html_url":"https://github.com/erickgnavar","followers_url":"https://api.github.com/users/erickgnavar/followers","following_url":"https://api.github.com/users/erickgnavar/following{/other_user}","gists_url":"https://api.github.com/users/erickgnavar/gists{/gist_id}","starred_url":"https://api.github.com/users/erickgnavar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erickgnavar/subscriptions","organizations_url":"https://api.github.com/users/erickgnavar/orgs","repos_url":"https://api.github.com/users/erickgnavar/repos","events_url":"https://api.github.com/users/erickgnavar/events{/privacy}","received_events_url":"https://api.github.com/users/erickgnavar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/erickgnavar/elixir-school","description":"Lessons in the Fundamentals of Elixir","fork":true,"url":"https://api.github.com/repos/erickgnavar/elixir-school","forks_url":"https://api.github.com/repos/erickgnavar/elixir-school/forks","keys_url":"https://api.github.com/repos/erickgnavar/elixir-school/keys{/key_id}","collaborators_url":"https://api.github.com/repos/erickgnavar/elixir-school/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/erickgnavar/elixir-school/teams","hooks_url":"https://api.github.com/repos/erickgnavar/elixir-school/hooks","issue_events_url":"https://api.github.com/repos/erickgnavar/elixir-school/issues/events{/number}","events_url":"https://api.github.com/repos/erickgnavar/elixir-school/events","assignees_url":"https://api.github.com/repos/erickgnavar/elixir-school/assignees{/user}","branches_url":"https://api.github.com/repos/erickgnavar/elixir-school/branches{/branch}","tags_url":"https://api.github.com/repos/erickgnavar/elixir-school/tags","blobs_url":"https://api.github.com/repos/erickgnavar/elixir-school/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/erickgnavar/elixir-school/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/erickgnavar/elixir-school/git/refs{/sha}","trees_url":"https://api.github.com/repos/erickgnavar/elixir-school/git/trees{/sha}","statuses_url":"https://api.github.com/repos/erickgnavar/elixir-school/statuses/{sha}","languages_url":"https://api.github.com/repos/erickgnavar/elixir-school/languages","stargazers_url":"https://api.github.com/repos/erickgnavar/elixir-school/stargazers","contributors_url":"https://api.github.com/repos/erickgnavar/elixir-school/contributors","subscribers_url":"https://api.github.com/repos/erickgnavar/elixir-school/subscribers","subscription_url":"https://api.github.com/repos/erickgnavar/elixir-school/subscription","commits_url":"https://api.github.com/repos/erickgnavar/elixir-school/commits{/sha}","git_commits_url":"https://api.github.com/repos/erickgnavar/elixir-school/git/commits{/sha}","comments_url":"https://api.github.com/repos/erickgnavar/elixir-school/comments{/number}","issue_comment_url":"https://api.github.com/repos/erickgnavar/elixir-school/issues/comments{/number}","contents_url":"https://api.github.com/repos/erickgnavar/elixir-school/contents/{+path}","compare_url":"https://api.github.com/repos/erickgnavar/elixir-school/compare/{base}...{head}","merges_url":"https://api.github.com/repos/erickgnavar/elixir-school/merges","archive_url":"https://api.github.com/repos/erickgnavar/elixir-school/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/erickgnavar/elixir-school/downloads","issues_url":"https://api.github.com/repos/erickgnavar/elixir-school/issues{/number}","pulls_url":"https://api.github.com/repos/erickgnavar/elixir-school/pulls{/number}","milestones_url":"https://api.github.com/repos/erickgnavar/elixir-school/milestones{/number}","notifications_url":"https://api.github.com/repos/erickgnavar/elixir-school/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/erickgnavar/elixir-school/labels{/name}","releases_url":"https://api.github.com/repos/erickgnavar/elixir-school/releases{/id}","deployments_url":"https://api.github.com/repos/erickgnavar/elixir-school/deployments","created_at":"2015-11-30T02:28:07Z","updated_at":"2016-01-22T23:39:07Z","pushed_at":"2017-11-12T16:49:00Z","git_url":"git://github.com/erickgnavar/elixir-school.git","ssh_url":"git@github.com:erickgnavar/elixir-school.git","clone_url":"https://github.com/erickgnavar/elixir-school.git","svn_url":"https://github.com/erickgnavar/elixir-school","homepage":"http://elixirschool.com","size":5205,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"elixirschool:master","ref":"master","sha":"82795204efca47855b6f1d9eb53b989cad67d1fc","user":{"login":"elixirschool","id":17727647,"avatar_url":"https://avatars2.githubusercontent.com/u/17727647?v=4","gravatar_id":"","url":"https://api.github.com/users/elixirschool","html_url":"https://github.com/elixirschool","followers_url":"https://api.github.com/users/elixirschool/followers","following_url":"https://api.github.com/users/elixirschool/following{/other_user}","gists_url":"https://api.github.com/users/elixirschool/gists{/gist_id}","starred_url":"https://api.github.com/users/elixirschool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixirschool/subscriptions","organizations_url":"https://api.github.com/users/elixirschool/orgs","repos_url":"https://api.github.com/users/elixirschool/repos","events_url":"https://api.github.com/users/elixirschool/events{/privacy}","received_events_url":"https://api.github.com/users/elixirschool/received_events","type":"Organization","site_admin":false},"repo":{"id":36616176,"name":"elixirschool","full_name":"elixirschool/elixirschool","owner":{"login":"elixirschool","id":17727647,"avatar_url":"https://avatars2.githubusercontent.com/u/17727647?v=4","gravatar_id":"","url":"https://api.github.com/users/elixirschool","html_url":"https://github.com/elixirschool","followers_url":"https://api.github.com/users/elixirschool/followers","following_url":"https://api.github.com/users/elixirschool/following{/other_user}","gists_url":"https://api.github.com/users/elixirschool/gists{/gist_id}","starred_url":"https://api.github.com/users/elixirschool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixirschool/subscriptions","organizations_url":"https://api.github.com/users/elixirschool/orgs","repos_url":"https://api.github.com/users/elixirschool/repos","events_url":"https://api.github.com/users/elixirschool/events{/privacy}","received_events_url":"https://api.github.com/users/elixirschool/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elixirschool/elixirschool","description":"Lessons about the Elixir programming language","fork":false,"url":"https://api.github.com/repos/elixirschool/elixirschool","forks_url":"https://api.github.com/repos/elixirschool/elixirschool/forks","keys_url":"https://api.github.com/repos/elixirschool/elixirschool/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elixirschool/elixirschool/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elixirschool/elixirschool/teams","hooks_url":"https://api.github.com/repos/elixirschool/elixirschool/hooks","issue_events_url":"https://api.github.com/repos/elixirschool/elixirschool/issues/events{/number}","events_url":"https://api.github.com/repos/elixirschool/elixirschool/events","assignees_url":"https://api.github.com/repos/elixirschool/elixirschool/assignees{/user}","branches_url":"https://api.github.com/repos/elixirschool/elixirschool/branches{/branch}","tags_url":"https://api.github.com/repos/elixirschool/elixirschool/tags","blobs_url":"https://api.github.com/repos/elixirschool/elixirschool/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elixirschool/elixirschool/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elixirschool/elixirschool/git/refs{/sha}","trees_url":"https://api.github.com/repos/elixirschool/elixirschool/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elixirschool/elixirschool/statuses/{sha}","languages_url":"https://api.github.com/repos/elixirschool/elixirschool/languages","stargazers_url":"https://api.github.com/repos/elixirschool/elixirschool/stargazers","contributors_url":"https://api.github.com/repos/elixirschool/elixirschool/contributors","subscribers_url":"https://api.github.com/repos/elixirschool/elixirschool/subscribers","subscription_url":"https://api.github.com/repos/elixirschool/elixirschool/subscription","commits_url":"https://api.github.com/repos/elixirschool/elixirschool/commits{/sha}","git_commits_url":"https://api.github.com/repos/elixirschool/elixirschool/git/commits{/sha}","comments_url":"https://api.github.com/repos/elixirschool/elixirschool/comments{/number}","issue_comment_url":"https://api.github.com/repos/elixirschool/elixirschool/issues/comments{/number}","contents_url":"https://api.github.com/repos/elixirschool/elixirschool/contents/{+path}","compare_url":"https://api.github.com/repos/elixirschool/elixirschool/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elixirschool/elixirschool/merges","archive_url":"https://api.github.com/repos/elixirschool/elixirschool/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elixirschool/elixirschool/downloads","issues_url":"https://api.github.com/repos/elixirschool/elixirschool/issues{/number}","pulls_url":"https://api.github.com/repos/elixirschool/elixirschool/pulls{/number}","milestones_url":"https://api.github.com/repos/elixirschool/elixirschool/milestones{/number}","notifications_url":"https://api.github.com/repos/elixirschool/elixirschool/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elixirschool/elixirschool/labels{/name}","releases_url":"https://api.github.com/repos/elixirschool/elixirschool/releases{/id}","deployments_url":"https://api.github.com/repos/elixirschool/elixirschool/deployments","created_at":"2015-05-31T18:27:42Z","updated_at":"2017-11-14T19:54:17Z","pushed_at":"2017-11-14T12:54:41Z","git_url":"git://github.com/elixirschool/elixirschool.git","ssh_url":"git@github.com:elixirschool/elixirschool.git","clone_url":"https://github.com/elixirschool/elixirschool.git","svn_url":"https://github.com/elixirschool/elixirschool","homepage":"https://elixirschool.com","size":5229,"stargazers_count":1399,"watchers_count":1399,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":473,"mirror_url":null,"archived":false,"open_issues_count":88,"forks":473,"open_issues":88,"watchers":1399,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elixirschool/elixirschool/pulls/1218"},"html":{"href":"https://github.com/elixirschool/elixirschool/pull/1218"},"issue":{"href":"https://api.github.com/repos/elixirschool/elixirschool/issues/1218"},"comments":{"href":"https://api.github.com/repos/elixirschool/elixirschool/issues/1218/comments"},"review_comments":{"href":"https://api.github.com/repos/elixirschool/elixirschool/pulls/1218/comments"},"review_comment":{"href":"https://api.github.com/repos/elixirschool/elixirschool/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elixirschool/elixirschool/pulls/1218/commits"},"statuses":{"href":"https://api.github.com/repos/elixirschool/elixirschool/statuses/62c940f5850e420da16841ba09b022a8d6d5b4f5"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"erickgnavar"}}