Class: HatenaGroup::Calendar::Keyword
- Inherits:
-
Object
- Object
- HatenaGroup::Calendar::Keyword
- Defined in:
- lib/hatenagroup/calendar.rb
Instance Method Summary collapse
- #body ⇒ Object
- #body=(s) ⇒ Object
-
#initialize(agent, group, keyword) ⇒ Keyword
constructor
A new instance of Keyword.
Constructor Details
#initialize(agent, group, keyword) ⇒ Keyword
Returns a new instance of Keyword.
39 40 41 42 43 |
# File 'lib/hatenagroup/calendar.rb', line 39 def initialize(agent, group, keyword) @agent = agent @group = group @keyword = keyword end |
Instance Method Details
#body ⇒ Object
45 46 47 |
# File 'lib/hatenagroup/calendar.rb', line 45 def body agent.get(read_url).form_with(:name => 'edit', :action => '/keyword').field_with(:name => 'body').value end |
#body=(s) ⇒ Object
49 50 51 52 53 54 55 |
# File 'lib/hatenagroup/calendar.rb', line 49 def body=(s) agent.get(edit_url).form_with(:name => 'edit', :action => '/keyword') do |form| next unless form form['body'] = s form.submit end end |