Module: SmoothOperator::ModelSchema
- Included in:
- OpenStruct
- Defined in:
- lib/smooth_operator/model_schema.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
5 6 7 |
# File 'lib/smooth_operator/model_schema.rb', line 5 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#internal_structure ⇒ Object
13 14 15 |
# File 'lib/smooth_operator/model_schema.rb', line 13 def internal_structure @internal_structure ||= self.class.internal_structure.dup end |
#known_attributes ⇒ Object
9 10 11 |
# File 'lib/smooth_operator/model_schema.rb', line 9 def known_attributes @known_attributes ||= self.class.known_attributes.dup end |
#model_name ⇒ Object
21 22 23 |
# File 'lib/smooth_operator/model_schema.rb', line 21 def model_name @model_name ||= table_name.singularize end |
#table_name ⇒ Object
17 18 19 |
# File 'lib/smooth_operator/model_schema.rb', line 17 def table_name @table_name ||= self.class.table_name.dup end |