module BookmarkParse
Public Instance Methods
get_icon_data(str)
click to toggle source
# File lib/bookmark_parse.rb, line 11 def get_icon_data(str) if str.include? 'ICON=' str[/icon=("|')[^("|')]*/i][6..-1] else '' end end
get_link_href(str)
click to toggle source
# File lib/bookmark_parse.rb, line 7 def get_link_href(str) str[/href=("|')[^("|')]*/i][6..-1] end
get_tag_content(str)
click to toggle source
# File lib/bookmark_parse.rb, line 3 def get_tag_content(str) str[%r{>([^<]*|(<\w*>[^<]*</\w*>))*<\/}][1..-3] end