Use parentheses around def arguments

master
Milton Mazzarri 2017-04-19 16:32:40 -05:00
parent b3becc42e0
commit 0968e947ae
No known key found for this signature in database
GPG Key ID: CF3DE6E356E17F1E
14 changed files with 16 additions and 16 deletions

View File

@ -637,5 +637,5 @@ defmodule Hunter do
Returns Hunter version
"""
@spec version() :: String.t
def version, do: @hunter_version
def version(), do: @hunter_version
end

View File

@ -22,7 +22,7 @@ defmodule Hunter.Account do
* `statuses_count` - the number of statuses the account has made
"""
@hunter_api Hunter.Config.hunter_api
@hunter_api Hunter.Config.hunter_api()
@type t :: %__MODULE__{
id: non_neg_integer,

View File

@ -12,7 +12,7 @@ defmodule Hunter.Application do
* `client_secret` - client secret
"""
@hunter_api Hunter.Config.hunter_api
@hunter_api Hunter.Config.hunter_api()
@type t :: %__MODULE__{
id: non_neg_integer,

View File

@ -15,7 +15,7 @@ defmodule Hunter.Attachment do
* `text_url` - Shorter URL for the image, for insertion into text (only present on local images)
"""
@hunter_api Hunter.Config.hunter_api
@hunter_api Hunter.Config.hunter_api()
@type t :: %__MODULE__{
id: non_neg_integer,

View File

@ -13,7 +13,7 @@ defmodule Hunter.Card do
* `image` - The image associated with the card, if any
"""
@hunter_api Hunter.Config.hunter_api
@hunter_api Hunter.Config.hunter_api()
@type t :: %__MODULE__{
url: URI.t,

View File

@ -3,7 +3,7 @@ defmodule Hunter.Client do
Defines a `Hunter` client
"""
@hunter_api Hunter.Config.hunter_api
@hunter_api Hunter.Config.hunter_api()
@type t :: %__MODULE__{
base_url: URI.t,
@ -31,7 +31,7 @@ defmodule Hunter.Client do
User agent of the client
"""
@spec user_agent() :: String.t
def user_agent do
def user_agent() do
"Hunter.Elixir/#{Hunter.version}"
end

View File

@ -3,7 +3,7 @@ defmodule Hunter.Config do
@hunter_api Application.get_env(:hunter, :hunter_api, Hunter.Api.HTTPClient)
def hunter_api do
@hunter_api
def hunter_api() do
@hunter_api
end
end

View File

@ -8,7 +8,7 @@ defmodule Hunter.Context do
* `descendants` - The descendants of the status in the conversation, as a list of Statuses
"""
@hunter_api Hunter.Config.hunter_api
@hunter_api Hunter.Config.hunter_api()
@type t :: %__MODULE__{
ancestors: [Hunter.Status.t],

View File

@ -13,7 +13,7 @@ defmodule Hunter.Instance do
* `email` - An email address which can be used to contact the instance administrator
"""
@hunter_api Hunter.Config.hunter_api
@hunter_api Hunter.Config.hunter_api()
@type t :: %__MODULE__{
uri: URI.t,

View File

@ -14,7 +14,7 @@ defmodule Hunter.Notification do
* `status` - The `Hunter.Status` associated with the notification, if applicable
"""
@hunter_api Hunter.Config.hunter_api
@hunter_api Hunter.Config.hunter_api()
@type t :: %__MODULE__{
id: String.t,

View File

@ -14,7 +14,7 @@ defmodule Hunter.Relationship do
* `requested` - Whether the user has requested to follow the account
"""
@hunter_api Hunter.Config.hunter_api
@hunter_api Hunter.Config.hunter_api()
@type t :: %__MODULE__{
following: boolean,

View File

@ -11,7 +11,7 @@ defmodule Hunter.Report do
* `action_taken` - The action taken in response to the report
"""
@hunter_api Hunter.Config.hunter_api
@hunter_api Hunter.Config.hunter_api()
@type t :: %__MODULE__{
id: non_neg_integer,

View File

@ -9,7 +9,7 @@ defmodule Hunter.Result do
* `hashtags` - list of matched hashtags, as strings
"""
@hunter_api Hunter.Config.hunter_api
@hunter_api Hunter.Config.hunter_api()
@type t :: %__MODULE__{
accounts: [Hunter.Account.t],

View File

@ -26,7 +26,7 @@ defmodule Hunter.Status do
* `application` - `Hunter.Application` from which the status was posted
"""
@hunter_api Hunter.Config.hunter_api
@hunter_api Hunter.Config.hunter_api()
@type t :: %__MODULE__{
id: non_neg_integer,