Class: Nitron::TableViewController

Inherits:
ViewController show all
Defined in:
lib/nitron/table_view_controller.rb

Defined Under Namespace

Classes: ArrayDataSource, CoreDataSource

Class Method Summary collapse

Methods inherited from ViewController

#close

Methods included from UI::ActionSupport

#_dispatch, #dealloc, included

Methods included from UI::DataBindingSupport

#dealloc, #model, #model=

Class Method Details

.collection(&block) ⇒ Object



3
4
5
# File 'lib/nitron/table_view_controller.rb', line 3

def self.collection(&block)
  options[:collection] = block
end

.group_by(name, opts = {}) ⇒ Object



7
8
9
10
# File 'lib/nitron/table_view_controller.rb', line 7

def self.group_by(name, opts={})
  options[:groupBy] = name.to_s
  options[:groupIndex] = opts[:index] || false
end

.optionsObject



12
13
14
15
16
17
18
# File 'lib/nitron/table_view_controller.rb', line 12

def self.options
  @options ||= {
    collection: lambda { [] },
    groupBy:    nil,
    groupIndex: false,
  }
end