Module: Definition::Initializer
- Defined in:
- lib/definition/initializer.rb
Defined Under Namespace
Modules: ClassMethods
Classes: InvalidArgumentError
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.included(klass) ⇒ Object
41
42
43
|
# File 'lib/definition/initializer.rb', line 41
def self.included(klass)
klass.extend(ClassMethods)
end
|
Instance Method Details
#initialize(**kwargs) ⇒ Object
45
46
47
48
49
50
|
# File 'lib/definition/initializer.rb', line 45
def initialize(**kwargs)
result = self.class._keys_definition.conform(kwargs)
raise InvalidArgumentError.new(result) unless result.passed?
@_attributes = result.value
end
|