Class: HatenaGroup::Calendar

Inherits:
Object
  • Object
show all
Defined in:
lib/hatenagroup/calendar.rb

Defined Under Namespace

Classes: Keyword

Instance Method Summary collapse

Constructor Details

#initialize(group, hatena_user_id, hatena_password) ⇒ Calendar

Returns a new instance of Calendar.



5
6
7
8
9
10
11
12
# File 'lib/hatenagroup/calendar.rb', line 5

def initialize(group, hatena_user_id, hatena_password)
  @group = group
  @agent = Mechanize.new
  agent.log = Logger.new(STDERR)
  agent.log.level = Logger::INFO
  agent.user_agent = USER_AGENT
  login! hatena_user_id, hatena_password
end

Instance Method Details

#day(d) ⇒ Object



14
15
16
# File 'lib/hatenagroup/calendar.rb', line 14

def day(d)
  keyword d.strftime("%Y-%m-%d")
end