lib/picasa.rb in morgoth-picasa-0.1.3 vs lib/picasa.rb in morgoth-picasa-0.1.4

- old
+ new

@@ -1,20 +1,18 @@ -module Picasa - require 'net/http' - require "xmlsimple" +require 'net/http' +require "xmlsimple" +require 'picasa/web_albums' - require 'web_albums.rb' - +module Picasa def self.albums(options = {}) - raise ArgumentError, "You must specify google_user" unless options[:google_user] + raise ArgumentError.new("You must specify google_user") unless options[:google_user] web_albums = Picasa::WebAlbums.new(options[:google_user]) web_albums.albums end def self.photos(options = {}) - unless options[:google_user] and options[:album_id] - raise ArgumentError, "You must specify google_user and album_id" - end + raise ArgumentError.new("You must specify google_user") unless options[:google_user] + raise ArgumentError.new("You must specify album_id") unless options[:album_id] web_albums = Picasa::WebAlbums.new(options[:google_user]) web_albums.photos(options[:album_id]) end end