Skip to content

Commit d8009cc

Browse files
committed
I regret adding rubocop
1 parent ff79d4e commit d8009cc

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

lib/code_generation.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def initialize(opts = {})
2525
# class name
2626
raise 'Name can not be empty!' if opts[:name].empty?
2727
raise 'Name can not start with an underscore!' if opts[:name].start_with?('_')
28+
2829
@name = opts[:name].to_camel
2930

3031
# [String] filename base without extension
@@ -95,7 +96,7 @@ class FileSystemHelper
9596
# @param text [String] text to be written to file
9697
#
9798
# @return [true, false] true if written
98-
def write(path, text)
99+
def write?(path, text)
99100
return false unless ok_to_overwrite? path
100101

101102
File.write(path, text)
@@ -133,7 +134,7 @@ def write_cpp_header
133134

134135
# create file
135136
path = "#{dir}/#{@controller.header_filename}"
136-
return unless @fs.write(path, gen_cpp_header)
137+
return unless @fs.write?(path, gen_cpp_header)
137138

138139
@cmake.add_file(path)
139140
end
@@ -144,7 +145,7 @@ def write_cpp_source
144145

145146
# create file
146147
path = "#{dir}/#{@controller.source_filename}"
147-
return unless @fs.write(path, gen_cpp_source)
148+
return unless @fs.write?(path, gen_cpp_source)
148149

149150
@cmake.add_file(path)
150151
end

0 commit comments

Comments
 (0)