lib/zelda/omroep.rb in zelda-1.2.1 vs lib/zelda/omroep.rb in zelda-1.3.0
- old
+ new
@@ -1,11 +1,11 @@
module Zelda
class Omroep < Zelda::Base
class << self
# Find an omroep by slug, such as +kro+.
def find(slug)
- attrs = Request.get("omroepen/#{slug}")['omroep'] rescue nil
- attrs ? new(attrs) : nil
+ response = Request.get("omroepen/#{slug}")
+ response ? new(response['omroep']) : nil
end
# Find all omroepen.
def all
Request.get("omroepen")['omroepen']
\ No newline at end of file