Sha256: b5deff12b1eb3571a77288a965de4f60407af92bb53f706b003cad3385f9a324
Contents?: true
Size: 470 Bytes
Versions: 6
Compression:
Stored size: 470 Bytes
Contents
require 'annotator/railtie' require 'annotator/model' require 'annotator/attributes' require 'annotator/initial_description' module Annotator def self.run(models_path = nil) models_path ||= defined?(Rails) ? "#{Rails.root}/app/models" : "." update_models(models_path) end def self.update_models(models_path) path = "#{models_path}/**/*.rb" Dir.glob(path).sort.map do |filename| Model.new(filename, models_path).update! end end end
Version data entries
6 entries across 6 versions & 1 rubygems