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



276
277
278
# File 'lib/crud_components/presenters/collection.rb', line 276

def key
  @key
end

#labelObject

Returns the value of attribute label

Returns:

  • (Object)

    the current value of label



276
277
278
# File 'lib/crud_components/presenters/collection.rb', line 276

def label
  @label
end

#recordsObject

Returns the value of attribute records

Returns:

  • (Object)

    the current value of records



276
277
278
# File 'lib/crud_components/presenters/collection.rb', line 276

def records
  @records
end

Instance Method Details

#countObject



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

def count = records.size