Class: Vimmer::Installers::VimDotOrg
- Inherits:
-
Object
- Object
- Vimmer::Installers::VimDotOrg
- Defined in:
- lib/vimmer/installers/vim_dot_org.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#plugin_name ⇒ Object
readonly
Returns the value of attribute plugin_name.
-
#script_id ⇒ Object
readonly
Returns the value of attribute script_id.
Class Method Summary collapse
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
10 11 12 |
# File 'lib/vimmer/installers/vim_dot_org.rb', line 10 def path @path end |
#plugin_name ⇒ Object (readonly)
Returns the value of attribute plugin_name.
10 11 12 |
# File 'lib/vimmer/installers/vim_dot_org.rb', line 10 def plugin_name @plugin_name end |
#script_id ⇒ Object (readonly)
Returns the value of attribute script_id.
10 11 12 |
# File 'lib/vimmer/installers/vim_dot_org.rb', line 10 def script_id @script_id end |
Class Method Details
.for_url(path) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/vimmer/installers/vim_dot_org.rb', line 17 def self.for_url(path) m = VIM_DOT_ORG_URL_PATTERN.match(path) script_id = m[1] raise Vimmer::PluginNotFoundError unless repository.key?(script_id) script_name = repository[script_id] github_path_template = "https://github.com/vim-scripts/%s.git" github_path = github_path_template % [script_name] Github.new(:path => github_path) end |
.match?(url) ⇒ Boolean
13 14 15 |
# File 'lib/vimmer/installers/vim_dot_org.rb', line 13 def self.match?(url) !(url =~ VIM_DOT_ORG_URL_PATTERN).nil? end |