lib/fake_picture.rb in fake_picture-0.2.4 vs lib/fake_picture.rb in fake_picture-0.2.5

- old
+ new

@@ -25,12 +25,13 @@ define_singleton_method :"#{name}" do self.superclass.random_file("#{path_to_pack + selector}") end - define_singleton_method :"#{name}_file" do - File.new(self.send(name)) - end + end + + define_singleton_method :file do |method_name| + File.new(self.send(method_name)) end end private