Class: DyCI::ClangStorage
- Inherits:
-
Object
- Object
- DyCI::ClangStorage
- Defined in:
- lib/dyci-compiler/clang_storage.rb
Instance Method Summary collapse
Instance Method Details
#load_arguments(class_name) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/dyci-compiler/clang_storage.rb', line 18 def load_arguments(class_name) args = [] index_file_path = self.index_path class_name File.open(index_file_path, 'r').each_line do |line| args << line.chomp.strip end args end |
#save_arguments(args) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/dyci-compiler/clang_storage.rb', line 8 def save_arguments(args) arguments = args.dup class_name = ClangParser.params(arguments)[:class_name] index_file_path = self.index_path class_name arguments.unshift Dir.pwd File.open(index_file_path, 'w') do |f| f.write arguments.join("\n") end end |