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



282
283
284
# File 'lib/crud_components/presenters/collection.rb', line 282

def key
  @key
end

#labelObject

Returns the value of attribute label

Returns:

  • (Object)

    the current value of label



282
283
284
# File 'lib/crud_components/presenters/collection.rb', line 282

def label
  @label
end

#recordsObject

Returns the value of attribute records

Returns:

  • (Object)

    the current value of records



282
283
284
# File 'lib/crud_components/presenters/collection.rb', line 282

def records
  @records
end

Instance Method Details

#countObject



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

def count = records.size