Class: Material::Base
Constant Summary
Constants included
from Text
Text::DEFAULT_TRUNCATE_LENGTH
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Attributes
#attribute_types, #attribute_values, #formatted_attributes, #human_attribute_value, #relationship_attributes, #sorted_attribute_names
Methods included from Core
#initialize
Class Method Details
.for(object) ⇒ Object
18
19
20
21
|
# File 'lib/material/base.rb', line 18
def self.for(object)
material_class = material_class_for(object, "Material")
material_class.new(object) if material_class.present?
end
|
Instance Method Details
#to_model ⇒ Object
27
28
29
|
# File 'lib/material/base.rb', line 27
def to_model
self
end
|
#to_source_model ⇒ Object
23
24
25
|
# File 'lib/material/base.rb', line 23
def to_source_model
source.to_model
end
|