class ActiveModel::Attribute

def encode_with(coder)

def encode_with(coder)
  coder["name"] = name
  coder["value_before_type_cast"] = value_before_type_cast unless value_before_type_cast.nil?
  coder["type"] = type if type
  coder["original_attribute"] = original_attribute if original_attribute
  coder["value"] = value if defined?(@value)
end