Class: Porni::Client
- Inherits:
-
Object
- Object
- Porni::Client
- Defined in:
- lib/porni/client.rb
Direct Known Subclasses
Constant Summary collapse
- ALLOWED_PAGES =
['porn.com', 'redtube.com', 'pornhub.com']
Class Method Summary collapse
Class Method Details
.get_agent(options = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/porni/client.rb', line 7 def self.get_agent( = {}) page = [:page] case page when 'porn' Porni::Hubs::Porn.new() when 'redtube' Porni::Hubs::Redtube.new() when 'xvideos' Porni::Hubs::Xvideos.new() when 'spankbang' Porni::Hubs::Spankbang.new() when 'pornhub' Porni::Hubs::Pornhub.new() else raise Porni::MissingApiError end end |