Class: Pod::Specification::Linter
- Inherits:
-
Object
- Object
- Pod::Specification::Linter
- Defined in:
- lib/pod-pipeline/extension/linter-ppl.rb
Instance Method Summary collapse
Instance Method Details
#write_to_file(property, value) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/pod-pipeline/extension/linter-ppl.rb', line 4 def write_to_file(property, value) puts "[写入 #{property} = #{value}]" file_content = File.read file file_content.gsub!(/(.*.#{property}.*=.*)('.*')/,"\\1'#{value}'") File.open(file, "w") { |f| f.puts file_content } end |