class Seedog::Evaluator
Attributes
changed[RW]
config[R]
dry_run[R]
Public Class Methods
new(config, dry_run: false)
click to toggle source
# File lib/seedog/evaluator.rb, line 8 def initialize(config, dry_run: false) @config = config @dry_run = dry_run @changed = false end
Public Instance Methods
run()
click to toggle source
# File lib/seedog/evaluator.rb, line 14 def run if dry_run puts "Apply `#{config.file.relative_path_from(Rails.root)}` (dry-run)" else puts "Apply `#{config.file.relative_path_from(Rails.root)}`" end dsl = DSL.new(self) dsl.instance_eval(config.file.read) unless changed puts 'No change' end end