Permalink
Browse files

Removed module wrapping

  • Loading branch information...
1 parent 61db6d9 commit 8bee169c4615a273159ec66c76b3d021d61bdb2e @namelessjon committed May 21, 2008
Showing with 30 additions and 36 deletions.
  1. +12 −14 app/models/album.rb
  2. +13 −15 app/models/album_list.rb
  3. +5 −7 app/models/photo.rb
View
@@ -2,24 +2,22 @@
# album.rb
# Jonathan D. Stott <jonathan.stott@gmail.com>
# Created: Wednesday, May 21, 2008 @ 19:07
-# Modified: Wednesday, May 21, 2008 @ 19:14
+# Modified: Wednesday, May 21, 2008 @ 19:50
-module PictureBook
- class Album
+class Album
- attr_reader :title
+ attr_reader :title
- def initialize(title,photos=[])
- @title = title
- @photes = photoes
- end
+ def initialize(title,photos=[])
+ @title = title
+ @photes = photoes
+ end
- def <<(photo)
- @photos << photo
- end
+ def <<(photo)
+ @photos << photo
+ end
- def each
- @photos.each { |p| yield p }
- end
+ def each
+ @photos.each { |p| yield p }
end
end
@@ -2,25 +2,23 @@
# album_list.rb
# Jonathan D. Stott <jonathan.stott@gmail.com>
# Created: Wednesday, May 21, 2008 @ 19:14
-# Modified: Wednesday, May 21, 2008 @ 19:17
+# Modified: Wednesday, May 21, 2008 @ 19:50
-module PictureBook
- class AlbumList
+class AlbumList
- def intialize
- @albums = []
- end
+ def intialize
+ @albums = []
+ end
- def <<(album)
- @albums << album
- end
+ def <<(album)
+ @albums << album
+ end
- def delete(album)
- @albums.delete(album)
- end
+ def delete(album)
+ @albums.delete(album)
+ end
- def each
- @albums.each {|a| yield a}
- end
+ def each
+ @albums.each {|a| yield a}
end
end
View
@@ -2,14 +2,12 @@
# photo.rb
# Jonathan D. Stott <jonathan.stott@gmail.com>
# Created: Wednesday, May 21, 2008 @ 19:06
-# Modified: Wednesday, May 21, 2008 @ 19:06
+# Modified: Wednesday, May 21, 2008 @ 19:50
-module PictureBook
- class Photo
- attr_reader :path
+class Photo
+ attr_reader :path
- def initialize(path)
- @path = path
- end
+ def initialize(path)
+ @path = path
end
end

0 comments on commit 8bee169

Please sign in to comment.