Class: CollectionsPage

Inherits:
UnderOs::Page
  • Object
show all
Defined in:
app/pages/collections_page.rb

Instance Method Summary collapse

Constructor Details

#initializeCollectionsPage

Returns a new instance of CollectionsPage.



2
3
4
5
6
7
8
9
10
11
12
13
14
# File 'app/pages/collections_page.rb', line 2

def initialize
  @collection = first('collection')
  @collection.number_of_items  = 1000
  @collection.on :item do |item, index|
    item.children[0].text = "##{index + 1}"
  end
  @collection.on :select do |item|
    item.addClass 'selected'
  end
  @collection.on :unselect do |item|
    item.removeClass 'selected'
  end
end