Class: ClangComplete

Inherits:
CKick::Plugin show all
Defined in:
lib/ckick/plugin/clang_complete.rb

Overview

Creates a .clang_complete file for clang auto completion

Instance Method Summary collapse

Methods inherited from CKick::Plugin

#cmake, #include, #initialize, #lib, #name, #run, #to_hash

Constructor Details

This class inherits a constructor from CKick::Plugin

Instance Method Details

#call(project) ⇒ Object

assembles project flags and writes a .clang_complete file at project root



11
12
13
14
15
16
17
18
19
20
# File 'lib/ckick/plugin/clang_complete.rb', line 11

def call(project)
  # :nodoc:
  def clang_complete project
    project.dependencies.flags.join("\n")
  end

  file = File.new(File.join(project.path, ".clang_complete"), 'w')
  file << clang_complete(project) << "\n"
  file.close
end

#clang_complete(project) ⇒ Object

:nodoc:



13
14
15
# File 'lib/ckick/plugin/clang_complete.rb', line 13

def clang_complete project
  project.dependencies.flags.join("\n")
end