Module: Vimpack::Utils::Github::ClassMethods
- Defined in:
- lib/vimpack/utils/github.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args) ⇒ Object
31
32
33
34
35
36
|
# File 'lib/vimpack/utils/github.rb', line 31
def method_missing(meth, *args)
if octokit.respond_to?(meth)
return wrap_http_call { octokit.send(meth, *args) }
end
super
end
|
Instance Method Details
#octokit ⇒ Object
12
13
14
|
# File 'lib/vimpack/utils/github.rb', line 12
def octokit
@octokit ||= Octokit::Client.new
end
|
#respond_to?(meth) ⇒ Boolean
27
28
29
|
# File 'lib/vimpack/utils/github.rb', line 27
def respond_to?(meth)
octokit.respond_to?(meth) || super
end
|
#search_all_repos(q, options = {}) ⇒ Object
16
17
18
19
20
21
|
# File 'lib/vimpack/utils/github.rb', line 16
def search_all_repos(q, options = {})
search_repositories(CGI.escape(q), options.merge(:language => 'VimL')).delete_if do |repo|
repo.name.downcase.include?('dotfiles') ||
repo.description.downcase.include?('dotfiles')
end
end
|
#search_vimscript_repos(q) ⇒ Object
23
24
25
|
# File 'lib/vimpack/utils/github.rb', line 23
def search_vimscript_repos(q)
search_all_repos(q).delete_if { |repo| !(repo.owner == 'vim-scripts') }
end
|