class Scraper

Public Class Methods

new(username, password) click to toggle source
# File lib/myfitnesspal_stats/scraper.rb, line 6
def initialize(username, password)
  @username = username
  @password = password

  @date = Date.today

  @account = Account.new(username, password)
  @login_page = @account.login

  @web_crawler = Mechanize.new do |web_crawler|
    web_crawler.cookie_jar.load('cookies.yml')
    web_crawler.follow_meta_refresh = true
  end
end

Public Instance Methods

get_date(year = @date.year, month = @date.month, day = @date.day) click to toggle source
# File lib/myfitnesspal_stats/scraper.rb, line 21
def get_date(year = @date.year, month = @date.month, day = @date.day)
  day = Day.new(year, month, day)
end