Class: Nicovideo::Community::Main

Inherits:
CommunityPage show all
Defined in:
lib/nicovideo/community/main.rb

Constant Summary

Constants inherited from CommunityPage

CommunityPage::COMMUNITY_BASE_URL

Constants inherited from Page

Page::BASE_TITLE1, Page::BASE_TITLE2, Page::BASE_URL, Page::NV_DEBUG_LEVEL

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Page

#exists?, #html, #title=

Constructor Details

#initialize(agent, community_id) ⇒ Main

Returns a new instance of Main.



5
6
7
8
9
10
# File 'lib/nicovideo/community/main.rb', line 5

def initialize agent, community_id
  super(agent, community_id)

  @url = COMMUNITY_BASE_URL + '/community/' + @community_id
  register_getter ["title", "description", "tags", "founded_at", "owner", "level"]
end

Instance Attribute Details

#community_idObject (readonly)

Returns the value of attribute community_id.



12
13
14
# File 'lib/nicovideo/community/main.rb', line 12

def community_id
  @community_id
end

#urlObject (readonly)

Returns the value of attribute url.



12
13
14
# File 'lib/nicovideo/community/main.rb', line 12

def url
  @url
end

Instance Method Details

#idObject



13
# File 'lib/nicovideo/community/main.rb', line 13

def id()   @community_id end