You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/Users/jd/.rvm/gems/[email protected]/gems/garb-0.9.1/lib/garb.rb:67:in `[]': can't convert String into Integer (TypeError)
from /Users/jd/.rvm/gems/[email protected]/gems/garb-0.9.1/lib/garb.rb:67:in `block in parse_link'
from /Users/jd/.rvm/gems/[email protected]/gems/garb-0.9.1/lib/garb.rb:67:in `each'
from /Users/jd/.rvm/gems/[email protected]/gems/garb-0.9.1/lib/garb.rb:67:in `detect'
from /Users/jd/.rvm/gems/[email protected]/gems/garb-0.9.1/lib/garb.rb:67:in `parse_link'
from /Users/jd/.rvm/gems/[email protected]/gems/garb-0.9.1/lib/garb/management/segment.rb:15:in `new_from_entry'
from /Users/jd/.rvm/gems/[email protected]/gems/garb-0.9.1/lib/garb/management/segment.rb:9:in `block in all'
from /Users/jd/.rvm/gems/[email protected]/gems/garb-0.9.1/lib/garb/management/segment.rb:9:in `map'
from /Users/jd/.rvm/gems/[email protected]/gems/garb-0.9.1/lib/garb/management/segment.rb:9:in `all'
The text was updated successfully, but these errors were encountered:
module Garb
def parse_link(entry, rel)
if entry['link'].is_a?(Array)
entry['link'].detect {|link| link["rel"] == rel}['href']
else
entry['link']['href']
end
end
end
Using:
Ruby 1.9.3
garb 0.9.1
Running sample code from: https://github.com/vigetlabs/garb/wiki/Segments which is...
Raises a TypeError exception...
The text was updated successfully, but these errors were encountered: