Class: HotCocoa::OutlineViewDataSource
- Defined in:
- lib/hotcocoa/data_sources/outline_view_data_source.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(data) ⇒ OutlineViewDataSource
constructor
A new instance of OutlineViewDataSource.
- #outlineView(view, objectValueForTableColumn: column, byItem: item) ⇒ Object
Constructor Details
#initialize(data) ⇒ OutlineViewDataSource
Returns a new instance of OutlineViewDataSource.
5 6 7 |
# File 'lib/hotcocoa/data_sources/outline_view_data_source.rb', line 5 def initialize data @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
3 4 5 |
# File 'lib/hotcocoa/data_sources/outline_view_data_source.rb', line 3 def data @data end |
Instance Method Details
#outlineView(view, objectValueForTableColumn: column, byItem: item) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/hotcocoa/data_sources/outline_view_data_source.rb', line 9 def outlineView view, numberOfChildrenOfItem: item if item.nil? data.length else item[:childRows].length end end |