Class: Material::List
- Inherits:
-
Collectible::CollectionBase
- Object
- Collectible::CollectionBase
- Material::List
show all
- Includes:
- Components, For, Icon, Site, Text
- Defined in:
- lib/material/list.rb
Constant Summary
Constants included
from Text
Text::DEFAULT_TRUNCATE_LENGTH
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.for(object) ⇒ Object
15
16
17
18
|
# File 'lib/material/list.rb', line 15
def self.for(object)
material_class = material_class_for(object, "List")
material_class.new if material_class.present?
end
|
Instance Method Details
#default_title ⇒ Object
20
21
22
|
# File 'lib/material/list.rb', line 20
def default_title
(item_class.try(:model_name)&.human || item_class&.name).pluralize || self.class.name
end
|