Module: Lotus::Validations::AttributeDefiner::EntityAttributeDefiner Private
- Defined in:
- lib/lotus/validations/attribute_definer.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Support for ‘Lotus::Entity`
Defined Under Namespace
Modules: InstanceMethods
Class Method Summary collapse
-
.extended(base) ⇒ Object
private
Override for Module#extend.
Instance Method Summary collapse
- #attribute(name, options = {}) ⇒ Object private
-
#define_attr_accessor(attr) ⇒ Object
private
Override attribute accessors function.
- #defined_attributes ⇒ Array<String> private
- #validates(name, options = {}) ⇒ Object private
Class Method Details
.extended(base) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Override for Module#extend
405 406 407 408 409 |
# File 'lib/lotus/validations/attribute_definer.rb', line 405 def self.extended(base) base.class_eval do include EntityAttributeDefiner::InstanceMethods end end |
Instance Method Details
#attribute(name, options = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
435 436 437 438 |
# File 'lib/lotus/validations/attribute_definer.rb', line 435 def attribute(name, = {}) attributes name super end |
#define_attr_accessor(attr) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Override attribute accessors function.
426 427 428 429 |
# File 'lib/lotus/validations/attribute_definer.rb', line 426 def define_attr_accessor(attr) _attribute(attr) super end |
#defined_attributes ⇒ Array<String>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
415 416 417 418 |
# File 'lib/lotus/validations/attribute_definer.rb', line 415 def defined_attributes super @defined_attributes.merge(attributes.map(&:to_s)) end |
#validates(name, options = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
444 445 446 447 |
# File 'lib/lotus/validations/attribute_definer.rb', line 444 def validates(name, = {}) super define_attribute(name, ) end |