On May 12, 2015, at 5:21 PM, Роман Ярыгин <[email protected]> wrote:
> 
> I stuck exactly on recursive algoritm. Can't find out how to build that 
> recursive function

It’s recursion, you call it again…

def start
  get_subtree(‘/‘)
end

def get_subtree(url)
  #fetch the page
  #parse it
  #for each link
    #normalize the link
    #if link not already visited
      #add link to table of visited links
        get_subtree(link)
    #end
  #end
end

-- 
Scott Ribe
[email protected]
http://www.elevated-dev.com/
https://www.linkedin.com/in/scottribe/
(303) 722-0567 voice





-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/05991756-60F6-4638-A68A-B6B28ADC7C41%40elevated-dev.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to