Sha256: 1898034887c1db00f11deab0d99564a96106925a288cb2cfbacfc2c3613801d6
Contents?: true
Size: 651 Bytes
Versions: 2
Compression:
Stored size: 651 Bytes
Contents
module Localtower module Generators module ServiceObjects class InsertArray def initialize(attributes) @attributes = attributes end def call attributes.each do |attribute| line_str = Localtower::Tools.line_for_attribute(attribute)[0] if line_str.present? content = File.read(Localtower::Tools.last_migration_pending).gsub(line_str, "#{line_str}, array: true") File.write(Localtower::Tools.last_migration_pending, content) end end end private attr_reader :attributes end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
localtower-2.0.1 | lib/localtower/generators/service_objects/insert_array.rb |
localtower-2.0.0 | lib/localtower/generators/service_objects/insert_array.rb |