Class: SmartCore::Validator::ClassState::Container
- Inherits:
-
Object
- Object
- SmartCore::Validator::ClassState::Container
- Defined in:
- lib/smart_core/validator/class_state/container.rb
Instance Attribute Summary collapse
-
#configuration ⇒ Object
Returns the value of attribute configuration.
-
#rules ⇒ Object
Returns the value of attribute rules.
-
#schema_class ⇒ Object
Returns the value of attribute schema_class.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(duplicated_configuration) ⇒ Container
constructor
A new instance of Container.
Constructor Details
#initialize(duplicated_configuration) ⇒ Container
Returns a new instance of Container.
38 39 40 41 42 |
# File 'lib/smart_core/validator/class_state/container.rb', line 38 def initialize(duplicated_configuration) self.schema_class = Class.new(SmartCore::Schema) self.configuration = duplicated_configuration self.rules = [] end |
Instance Attribute Details
#configuration ⇒ Object
Returns the value of attribute configuration.
5 6 7 |
# File 'lib/smart_core/validator/class_state/container.rb', line 5 def configuration @configuration end |
#rules ⇒ Object
Returns the value of attribute rules.
6 7 8 |
# File 'lib/smart_core/validator/class_state/container.rb', line 6 def rules @rules end |
#schema_class ⇒ Object
Returns the value of attribute schema_class.
4 5 6 |
# File 'lib/smart_core/validator/class_state/container.rb', line 4 def schema_class @schema_class end |
Class Method Details
.create_base_container ⇒ Object
13 14 15 |
# File 'lib/smart_core/validator/class_state/container.rb', line 13 def create_base_container new(build_base_config) end |
.new(*args) ⇒ Object
9 10 11 |
# File 'lib/smart_core/validator/class_state/container.rb', line 9 def new(*args) super.freeze end |