Class: Lebowski::Foundation::Views::Support::CollectionItemArray

Inherits:
ObjectArray
  • Object
show all
Includes:
Lebowski::Foundation
Defined in:
lib/lebowski/foundation/views/collection.rb

Overview

Represents a generic array of content objects for a collection view

Direct Known Subclasses

CollectionItemViewArray

Constant Summary

Constants included from Lebowski::Foundation

SC_BRANCH_CLOSED, SC_BRANCH_OPEN, SC_BUTTON1_STATUS, SC_BUTTON2_STATUS, SC_BUTTON3_STATUS, SC_LEAF_NODE, SC_MIXED_STATE, SC_PICKER_FIXED, SC_PICKER_MENU, SC_PICKER_POINTER, SC_T_ARRAY, SC_T_BOOL, SC_T_CLASS, SC_T_ERROR, SC_T_FUNCTION, SC_T_HASH, SC_T_NULL, SC_T_NUMBER, SC_T_OBJECT, SC_T_STRING, SC_T_UNDEFINED

Instance Method Summary collapse

Methods inherited from ObjectArray

#[], #all?, #any?, #count, #each, #empty?, #filter, #find_all, #find_first, #find_indexes, #find_last, #first, #index_of, #last, #member?, #none?, #one?, #prefilter

Constructor Details

#initialize(parent, *params) ⇒ CollectionItemArray

Returns a new instance of CollectionItemArray.



79
80
81
# File 'lib/lebowski/foundation/views/collection.rb', line 79

def initialize(parent, *params)
  super(parent, 'content', 'length', *params)
end

Instance Method Details

#selectedObject



83
84
85
86
# File 'lib/lebowski/foundation/views/collection.rb', line 83

def selected()
  @selected = self.filter({ :is_selected => true }) if @selected.nil?
  return @selected
end