Class: CrudComponents::Presenters::Collection::Group

Inherits:
Struct
  • Object
show all
Defined in:
lib/crud_components/presenters/collection.rb

Overview

── grouping ───────────────────────────────────────────────────────── A run of records sharing one group value. key is URL-safe (for ?open=), label is for display.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#keyObject

Returns the value of attribute key

Returns:

  • (Object)

    the current value of key



285
286
287
# File 'lib/crud_components/presenters/collection.rb', line 285

def key
  @key
end

#labelObject

Returns the value of attribute label

Returns:

  • (Object)

    the current value of label



285
286
287
# File 'lib/crud_components/presenters/collection.rb', line 285

def label
  @label
end

#recordsObject

Returns the value of attribute records

Returns:

  • (Object)

    the current value of records



285
286
287
# File 'lib/crud_components/presenters/collection.rb', line 285

def records
  @records
end

Instance Method Details

#countObject



286
# File 'lib/crud_components/presenters/collection.rb', line 286

def count = records.size