Module: AttrJson

Defined in:
lib/attr_json.rb,
lib/attr_json/model.rb,
lib/attr_json/config.rb,
lib/attr_json/record.rb,
lib/attr_json/version.rb,
lib/attr_json/type/array.rb,
lib/attr_json/type/model.rb,
lib/attr_json/nested_attributes.rb,
lib/attr_json/model/cocoon_compat.rb,
lib/attr_json/record/query_scopes.rb,
lib/attr_json/attribute_definition.rb,
lib/attr_json/record/query_builder.rb,
lib/attr_json/type/polymorphic_model.rb,
lib/attr_json/nested_attributes/writer.rb,
lib/attr_json/type/container_attribute.rb,
lib/attr_json/nested_attributes/builder.rb,
lib/attr_json/model/nested_model_validator.rb,
lib/attr_json/attribute_definition/registry.rb,
lib/attr_json/serialization_coder_from_type.rb,
lib/attr_json/nested_attributes/multiparameter_attribute_writer.rb

Defined Under Namespace

Modules: Model, NestedAttributes, Record, Type Classes: AttributeDefinition, Config, SerializationCoderFromType

Constant Summary collapse

VERSION =
"2.5.0"

Class Method Summary collapse

Class Method Details

.efficient_to_s(obj) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/attr_json.rb', line 22

def self.efficient_to_s(obj)
  if obj.kind_of?(Symbol)
    obj.name
  else
    obj.to_s
  end
end