Skip to content

Commit

Permalink
Use super instead of raising NoMethodError in method_missing
Browse files Browse the repository at this point in the history
  • Loading branch information
kimjoar committed Aug 26, 2010
1 parent ed6a3ee commit 168c8e9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/instapush.rb
Expand Up @@ -58,8 +58,11 @@ def errors
@errors ||= []
end

def method_missing(sym)
raise NoMethodError unless sym.to_s.include? '_url'
api_url + sym.to_s.chomp('_url')
def method_missing(symbol)
if symbol.to_s.include? '_url'
api_url + symbol.to_s.chomp('_url')
else
super
end
end
end

0 comments on commit 168c8e9

Please sign in to comment.