Module: CDEKApiClient::Entities::Validatable::ClassMethods
- Defined in:
- lib/cdek_api_client/entities/validatable.rb
Overview
Class methods for the Validatable module.
Instance Method Summary collapse
-
#validates(attribute, options) ⇒ Object
Defines validations for attributes.
-
#validations ⇒ Hash
Returns the defined validations.
Instance Method Details
#validates(attribute, options) ⇒ Object
Defines validations for attributes.
21 22 23 24 |
# File 'lib/cdek_api_client/entities/validatable.rb', line 21 def validates(attribute, ) @validations ||= {} @validations[attribute] = end |
#validations ⇒ Hash
Returns the defined validations.
29 30 31 |
# File 'lib/cdek_api_client/entities/validatable.rb', line 29 def validations @validations end |