Class: Markify::Scraper::Base
- Inherits:
-
Object
- Object
- Markify::Scraper::Base
- Defined in:
- lib/markify/scraper/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#marks ⇒ Object
readonly
Returns the value of attribute marks.
Instance Method Summary collapse
-
#initialize(login_name, login_password, sis_login_page) ⇒ Base
constructor
A new instance of Base.
- #scrape! ⇒ Object
- #test_login ⇒ Object
Constructor Details
#initialize(login_name, login_password, sis_login_page) ⇒ Base
Returns a new instance of Base.
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/markify/scraper/base.rb', line 28 def initialize(login_name, login_password, sis_login_page) @agent = Mechanize.new original, library = */(.*) \(.*\)$/.match(@agent.user_agent) @agent.user_agent = "#{Markify::NAME.capitalize}/#{Markify::VERSION} #{library} (https://github.com/meise/markify)" @data = {} @data[:login_page] = sis_login_page @data[:login_name] = login_name @data[:login_password] = login_password @marks = [] end |
Instance Attribute Details
#marks ⇒ Object (readonly)
Returns the value of attribute marks.
26 27 28 |
# File 'lib/markify/scraper/base.rb', line 26 def marks @marks end |
Instance Method Details
#scrape! ⇒ Object
42 43 44 |
# File 'lib/markify/scraper/base.rb', line 42 def scrape! scrape end |
#test_login ⇒ Object
46 47 48 |
# File 'lib/markify/scraper/base.rb', line 46 def test_login puts 'Scraper: Nothing to test.' end |