class FFI::Clang::CompilationDatabase::CompileCommands

Public Class Methods

new(pointer, database) click to toggle source
Calls superclass method
# File lib/ffi/clang/compilation_database.rb, line 53
def initialize(pointer, database)
        super pointer
        @database = database
end
release(pointer) click to toggle source
# File lib/ffi/clang/compilation_database.rb, line 58
def self.release(pointer)
        Lib.compile_commands_dispose(pointer)
end

Public Instance Methods

command(i) click to toggle source
# File lib/ffi/clang/compilation_database.rb, line 66
def command(i)
        CompileCommand.new Lib.compile_commands_get_command(self, i)
end
commands() click to toggle source
# File lib/ffi/clang/compilation_database.rb, line 70
def commands
        size.times.map { |i| command(i) }
end
each(&block) click to toggle source
# File lib/ffi/clang/compilation_database.rb, line 74
def each(&block)
        size.times.map do |i|
                block.call(command(i))
        end
end
size() click to toggle source
# File lib/ffi/clang/compilation_database.rb, line 62
def size
        Lib.compile_commands_get_size(self)
end