Sha256: 0c537886a8a27848c652178216edb946016be6a9db60ea1c745834d11e8faf63

Contents?: true

Size: 1.25 KB

Versions: 1

Compression:

Stored size: 1.25 KB

Contents

require 'jldrill/contexts/ShowAllVocabularyContext'

module JLDrill::Test
	class VocabularyTableView < JLDrill::ShowAllVocabularyContext::VocabularyTableView
	    attr_reader :destroyed, :updated, :selectedItem, :updatedItem,
                    :addedItem, :removedItem, :closed
        attr_writer :destroyed, :updated, :selectedItem, :updatedItem,
                    :addedItem, :removedItem, :closed
	
		def initialize(context)
			super(context)
            @destroyed = false
            @updated = false
            @selectedItem = nil
            @updatedItem = nil
            @addedItem = nil
            @removedItem = nil
            @closed = nil
		end
		
		def destroy
            @destroyed = true
		end
		
		def update(items)
            super(items)
            @updated = true
		end

        def select(item)
            super(item)
            @selectedItem = item
        end

        def updateItem(item)
            super(item)
            @updatedItem = item
        end

        def addItem(item)
            super(item)
            @addedItem = item
        end

        def removeItem(item)
            super(item)
            @removedItem = item
        end

        def close
            @closed = true
            super(item)
        end
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jldrill-0.5.1.7 lib/jldrill/views/test/VocabularyTableView.rb