class Esquema::Property

def as_json

Returns:
  • (Hash) - The JSON representation of the Property.
def as_json
  KEYWORDS.each_with_object({}) do |property, hash|
    value = send("build_#{property.downcase}")
    next if value.nil? || (value.is_a?(String) && value.empty?)
    hash[property] = value
  end.compact
end