Module: ActiveAttr::TypecastedAttributes::ClassMethods
- Defined in:
- lib/active_attr/typecasted_attributes.rb
Overview
Instance Method Summary collapse
-
#inspect ⇒ String
Returns the class name plus its attribute names and types.
Instance Method Details
#inspect ⇒ String
Returns the class name plus its attribute names and types
88 89 90 91 92 |
# File 'lib/active_attr/typecasted_attributes.rb', line 88 def inspect inspected_attributes = attribute_names.sort.map { |name| "#{name}: #{_attribute_type(name)}" } attributes_list = "(#{inspected_attributes.join(", ")})" unless inspected_attributes.empty? "#{name}#{attributes_list}" end |