Class: Swat::CompletedView

Inherits:
Object
  • Object
show all
Includes:
ListHelper
Defined in:
lib/completed_view.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(done_view, parent_view) ⇒ CompletedView

Returns a new instance of CompletedView.



5
6
7
8
9
10
11
12
13
# File 'lib/completed_view.rb', line 5

def initialize(done_view,parent_view)
  @todo_data = parent_view.todo_data
  @list_view = done_view
  @parent_view = parent_view
  @model = create_model(false)
  load_available_lists
  add_columns
  @list_view.expand_all
end

Instance Attribute Details

#list_viewObject

Returns the value of attribute list_view.



4
5
6
# File 'lib/completed_view.rb', line 4

def list_view
  @list_view
end

#parent_viewObject

Returns the value of attribute parent_view.



4
5
6
# File 'lib/completed_view.rb', line 4

def parent_view
  @parent_view
end

#todo_dataObject

Returns the value of attribute todo_data.



4
5
6
# File 'lib/completed_view.rb', line 4

def todo_data
  @todo_data
end

Instance Method Details

#reload_viewObject



15
16
17
18
19
20
# File 'lib/completed_view.rb', line 15

def reload_view
  @todo_data = parent_view.todo_data
  @model = create_model(false)
  load_available_lists
  @list_view.expand_all
end