Class: Material::Base

Inherits:
Spicerack::AttributeObject
  • Object
show all
Includes:
Components, Core, For, Icon, Site, Text
Defined in:
lib/material/base.rb

Constant Summary

Constants included from Text

Text::DEFAULT_TRUNCATE_LENGTH

Class Method Summary collapse

Methods included from Core

#initialize

Class Method Details

.for(object) ⇒ Object



12
13
14
15
# File 'lib/material/base.rb', line 12

def self.for(object)
  material_class = material_class_for(object, "Material")
  material_class.new(object) if material_class.present?
end