Class: CrowdFundingParser::Parser::Hereo
- Defined in:
- lib/crowd_funding_parser/parser/hereo.rb
Instance Method Summary collapse
- #get_id(project_url) ⇒ Object
- #get_lists ⇒ Object
-
#initialize ⇒ Hereo
constructor
A new instance of Hereo.
Methods inherited from General
#get_doc_through_url, #get_json_through_url, #get_project, #get_project_links, #get_result, #parse_content_data, #parse_tracking_data
Constructor Details
#initialize ⇒ Hereo
Returns a new instance of Hereo.
4 5 6 7 8 |
# File 'lib/crowd_funding_parser/parser/hereo.rb', line 4 def initialize @platform_url = "http://www.hereo.cc/" @item_css_class = ".project-list ul li" @status_css_class = ".projectImg .info .inner .detail span:nth-child(1)" end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class CrowdFundingParser::Parser::General
Instance Method Details
#get_id(project_url) ⇒ Object
14 15 16 |
# File 'lib/crowd_funding_parser/parser/hereo.rb', line 14 def get_id(project_url) project_url.split("pid=").last end |
#get_lists ⇒ Object
10 11 12 |
# File 'lib/crowd_funding_parser/parser/hereo.rb', line 10 def get_lists [HTTParty.get(@platform_url + "/project-list.php")] end |