Class: Wikidotrb::Module::PageVoteCollection

Inherits:
Array
  • Object
show all
Defined in:
lib/wikidotrb/module/page_votes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(page:, votes: []) ⇒ PageVoteCollection

初期化メソッド

Parameters:

  • page (Page)

    ページオブジェクト

  • votes (Array<PageVote>) (defaults to: [])

    投票オブジェクトのリスト



11
12
13
14
# File 'lib/wikidotrb/module/page_votes.rb', line 11

def initialize(page:, votes: [])
  super(votes)
  @page = page
end

Instance Attribute Details

#page

Returns the value of attribute page.



6
7
8
# File 'lib/wikidotrb/module/page_votes.rb', line 6

def page
  @page
end