class Bundler::Thor::LineEditor::Readline::PathCompletion
属性
text[R]
公共类方法
new(text) 点击切换源代码
# File bundler/vendor/thor/lib/thor/line_editor/readline.rb, line 54 def initialize(text) @text = text end
公共实例方法
matches() 点击切换源代码
# File bundler/vendor/thor/lib/thor/line_editor/readline.rb, line 58 def matches relative_matches end
私有实例方法
absolute_matches() 点击切换源代码
# File bundler/vendor/thor/lib/thor/line_editor/readline.rb, line 68 def absolute_matches Dir[glob_pattern].map do |path| if File.directory?(path) "#{path}/" else path end end end
base_path() 点击切换源代码
# File bundler/vendor/thor/lib/thor/line_editor/readline.rb, line 82 def base_path "#{Dir.pwd}/" end
glob_pattern() 点击切换源代码
# File bundler/vendor/thor/lib/thor/line_editor/readline.rb, line 78 def glob_pattern "#{base_path}#{text}*" end
relative_matches() 点击切换源代码
# File bundler/vendor/thor/lib/thor/line_editor/readline.rb, line 64 def relative_matches absolute_matches.map { |path| path.sub(base_path, "") } end