Method: BeStrong::StrongParameter.apply
- Defined in:
- lib/be_strong/strong_parameter.rb
.apply(file) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/be_strong/strong_parameter.rb', line 13 def apply(file) buf = File.open(file, 'r'){|f| f.read} code = Code.new(buf).apply_strong_parameter! return false unless code.changed? File.open(file, 'w'){|f| f.puts(code.to_str)} true end |