Skip to content

Commit

Permalink
Extract some methods in LibclangFinder
Browse files Browse the repository at this point in the history
  • Loading branch information
eraserhd committed Aug 4, 2012
1 parent eea3db3 commit 80569df
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion lib/ios/vim/libclang_finder.rb
Expand Up @@ -8,10 +8,25 @@ def initialize(command_runner = ShellCommandRunner.new)
end

def find
File.join(lib_directory, 'libclang.dylib')
end

def path_to_clang
code, output = @command_runner.run "xcrun -find clang"
raise IOError.new unless code == 0
File.join(File.dirname(File.dirname(output)),'lib','libclang.dylib')
output.chop
end
private :path_to_clang

def clang_directory
File.dirname(path_to_clang)
end
private :clang_directory

def lib_directory
File.join(File.dirname(clang_directory),'lib')
end
private :lib_directory
end

end
Expand Down

0 comments on commit 80569df

Please sign in to comment.