Module: GitHub::Client::Gitignore

Included in:
GitHub::Client
Defined in:
lib/github_api_v3/client/gitignore.rb

Overview

Contains methods for the Gitignore API.

Instance Method Summary collapse

Instance Method Details

#gitignore(name) ⇒ String

Gets a single .gitignore template.

Examples:

GitHub.gitignore("Ruby")

Parameters:

  • name (String)

    The template name.

Returns:

  • (String)

    The template contents.

See Also:



26
27
28
# File 'lib/github_api_v3/client/gitignore.rb', line 26

def gitignore(name)
  get "/gitignore/templates/#{name}"
end

#gitignore_listArray

Lists available .gitignore templates.

Examples:

GitHub.gitignore_list

Returns:

  • (Array)

    List of template names.

See Also:



15
16
17
# File 'lib/github_api_v3/client/gitignore.rb', line 15

def gitignore_list
  get '/gitignore/templates'
end