Class: Contentful::Management::Validation
- Inherits:
-
Object
- Object
- Contentful::Management::Validation
- Includes:
- Resource
- Defined in:
- lib/contentful/management/validation.rb
Overview
A ContentType’s validations schema
Instance Attribute Summary
Attributes included from Resource
#client, #default_locale, #properties, #raw_object, #request
Instance Method Summary collapse
-
#type ⇒ Symbol
Returns type of validation.
Methods included from Resource
#array?, #destroy, #environment_id, #fields, #nested_locale_fields?, #resource?, #sys, #update
Instance Method Details
#type ⇒ Symbol
Returns type of validation
30 31 32 33 34 35 |
# File 'lib/contentful/management/validation.rb', line 30 def type properties.keys.reject { |key| key == :validations }.each do |type| value = send(Support.snakify(type)) return type if !value.nil? && value end end |