renamed artsiteproxy to sources

This commit is contained in:
albert
2011-09-26 12:54:42 -04:00
parent 0e0f2af6ff
commit a1657366c1
13 changed files with 137 additions and 9 deletions

View File

@@ -0,0 +1,18 @@
module Sources
class Site
attr_reader :url, :strategy
delegate :artist_name, :profile_url, :image_url, :tags, :to => :strategy
def initialize(url)
@url = url
case url
when /pixiv\.net/
@strategy = Strategies::Pixiv.new(url)
else
@strategy = Strategies::Default.new(url)
end
end
end
end