lib/exercism/assignment.rb in exercism-0.0.12 vs lib/exercism/assignment.rb in exercism-0.0.13

- old
+ new

@@ -1,13 +1,11 @@ class Exercism class Assignment def self.save(data, path) - assignments = [] - data['assignments'].each do |attributes| - assignments << Assignment.new(attributes.merge('project_dir' => path)).save + data['assignments'].map do |attributes| + Assignment.new(attributes.merge('project_dir' => path)).save end - assignments end attr_reader :track, :slug, :readme, :test_file, :tests, :project_dir def initialize(attributes)