lib/config_manager/toggle.rb in config_manager-0.0.9 vs lib/config_manager/toggle.rb in config_manager-0.0.10

- old
+ new

@@ -48,22 +48,20 @@ create({:name => name, :type => values['type'], :formatted_acceptable_values => values['acceptable_values']}) counts[0] += 1 rescue RuntimeError - Rails.logger.error " Bad toggle definition. #{$!}" + Rails.logger.error "Bad toggle definition. #{$!}" counts[1] += 1 end end counts end - def self.to_yaml(path) - File.open(path, 'w') do |file| - toggles_hash = Hash[toggles.map(&:to_hash).map{|t| [t.keys.first, t.values.first]}] - YAML.dump(toggles_hash, file) - end + def self.to_yaml + toggles_hash = Hash[toggles.map(&:to_hash).map{|t| [t.keys.first, t.values.first]}] + YAML.dump(toggles_hash) end def self.quick(name, acceptable_values='test') create :name => name, :type => 'set',