domainic-attributer 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +11 -0
  3. data/CHANGELOG.md +32 -1
  4. data/README.md +42 -355
  5. data/docs/USAGE.md +723 -0
  6. data/lib/domainic/attributer/attribute/callback.rb +21 -9
  7. data/lib/domainic/attributer/attribute/coercer.rb +28 -13
  8. data/lib/domainic/attributer/attribute/mixin/belongs_to_attribute.rb +16 -13
  9. data/lib/domainic/attributer/attribute/signature.rb +43 -32
  10. data/lib/domainic/attributer/attribute/validator.rb +46 -16
  11. data/lib/domainic/attributer/attribute.rb +28 -18
  12. data/lib/domainic/attributer/attribute_set.rb +21 -19
  13. data/lib/domainic/attributer/class_methods.rb +136 -83
  14. data/lib/domainic/attributer/dsl/attribute_builder/option_parser.rb +64 -22
  15. data/lib/domainic/attributer/dsl/attribute_builder.rb +515 -26
  16. data/lib/domainic/attributer/dsl/initializer.rb +23 -18
  17. data/lib/domainic/attributer/dsl/method_injector.rb +16 -14
  18. data/lib/domainic/attributer/errors/aggregate_error.rb +36 -0
  19. data/lib/domainic/attributer/errors/callback_execution_error.rb +30 -0
  20. data/lib/domainic/attributer/errors/coercion_execution_error.rb +37 -0
  21. data/lib/domainic/attributer/errors/error.rb +19 -0
  22. data/lib/domainic/attributer/errors/validation_execution_error.rb +30 -0
  23. data/lib/domainic/attributer/instance_methods.rb +11 -8
  24. data/lib/domainic/attributer/undefined.rb +9 -7
  25. data/lib/domainic/attributer.rb +88 -27
  26. data/sig/domainic/attributer/attribute/callback.rbs +10 -7
  27. data/sig/domainic/attributer/attribute/coercer.rbs +14 -11
  28. data/sig/domainic/attributer/attribute/mixin/belongs_to_attribute.rbs +14 -12
  29. data/sig/domainic/attributer/attribute/signature.rbs +43 -32
  30. data/sig/domainic/attributer/attribute/validator.rbs +28 -13
  31. data/sig/domainic/attributer/attribute.rbs +27 -17
  32. data/sig/domainic/attributer/attribute_set.rbs +21 -19
  33. data/sig/domainic/attributer/class_methods.rbs +133 -80
  34. data/sig/domainic/attributer/dsl/attribute_builder/option_parser.rbs +62 -22
  35. data/sig/domainic/attributer/dsl/attribute_builder.rbs +515 -26
  36. data/sig/domainic/attributer/dsl/initializer.rbs +21 -19
  37. data/sig/domainic/attributer/dsl/method_injector.rbs +16 -14
  38. data/sig/domainic/attributer/errors/aggregate_error.rbs +28 -0
  39. data/sig/domainic/attributer/errors/callback_execution_error.rbs +23 -0
  40. data/sig/domainic/attributer/errors/coercion_execution_error.rbs +29 -0
  41. data/sig/domainic/attributer/errors/error.rbs +17 -0
  42. data/sig/domainic/attributer/errors/validation_execution_error.rbs +23 -0
  43. data/sig/domainic/attributer/instance_methods.rbs +11 -8
  44. data/sig/domainic/attributer/undefined.rbs +5 -3
  45. data/sig/domainic/attributer.rbs +88 -27
  46. metadata +19 -6
@@ -1,13 +1,15 @@
1
1
  module Domainic
2
2
  module Attributer
3
3
  module DSL
4
- # A class responsible for handling object initialization with attributes.
4
+ # A class responsible for handling object initialization with attributes
5
5
  #
6
6
  # This class manages the process of setting attribute values during object
7
7
  # initialization. It handles both positional arguments and keyword options,
8
8
  # applying them to their corresponding attributes while respecting default
9
- # values and required attributes.
9
+ # values and required attributes
10
10
  #
11
+ # @api private
12
+ # @!visibility private
11
13
  # @author {https://aaronmallen.me Aaron Allen}
12
14
  # @since 0.1.0
13
15
  class Initializer
@@ -19,21 +21,21 @@ module Domainic
19
21
 
20
22
  @attributes: AttributeSet
21
23
 
22
- # Initialize a new Initializer.
24
+ # Initialize a new Initializer
23
25
  #
24
26
  # @param base [Object] the instance being initialized
25
27
  #
26
- # @return [void]
28
+ # @return [Initializer] the new Initializer instance
27
29
  def initialize: (Object base) -> void
28
30
 
29
- # Assign values to attributes.
31
+ # Assign values to attributes
30
32
  #
31
33
  # Validates and applies both positional arguments and keyword options to
32
34
  # their corresponding attributes. Raises an error if required arguments
33
- # are missing.
35
+ # are missing
34
36
  #
35
- # @param arguments [Array] positional arguments to assign
36
- # @param keyword_arguments [Hash] keyword arguments to assign
37
+ # @param arguments [Array<Object>] positional arguments to assign
38
+ # @param keyword_arguments [Hash{Symbol => Object}] keyword arguments to assign
37
39
  #
38
40
  # @raise [ArgumentError] if required arguments are missing
39
41
  # @return [void]
@@ -41,46 +43,46 @@ module Domainic
41
43
 
42
44
  private
43
45
 
44
- # Access to the current attribute set.
46
+ # Access to the current attribute set
45
47
  #
46
48
  # @return [AttributeSet] the attribute set for this instance
47
49
  attr_reader attributes: AttributeSet
48
50
 
49
- # Apply positional arguments to their attributes.
51
+ # Apply positional arguments to their attributes
50
52
  #
51
- # @param arguments [Array] the positional arguments to apply
53
+ # @param arguments [Array<Object>] the positional arguments to apply
52
54
  #
53
55
  # @return [void]
54
56
  def apply_arguments: (Array[untyped]) -> void
55
57
 
56
- # Apply keyword arguments to their attributes.
58
+ # Apply keyword arguments to their attributes
57
59
  #
58
- # @param options [Hash] the keyword options to apply
60
+ # @param options [Hash{Symbol => Object}] the keyword options to apply
59
61
  #
60
62
  # @return [void]
61
63
  def apply_options!: (Hash[String | Symbol, untyped]) -> void
62
64
 
63
- # Get all argument attributes.
65
+ # Get all argument attributes
64
66
  #
65
67
  # @return [Array<Attribute>] the argument attributes
66
68
  def argument_attributes: () -> Array[Attribute]
67
69
 
68
- # Assign a value to an attribute.
70
+ # Assign a value to an attribute
69
71
  #
70
72
  # @param attribute_name [Symbol] the name of the attribute
71
73
  # @param value [Object] the value to assign
72
74
  #
73
75
  # @return [void]
74
- def assign_value: (untyped attribute_name, untyped value) -> untyped
76
+ def assign_value: (String | Symbol attribute_name, untyped value) -> void
75
77
 
76
- # Get all option attributes.
78
+ # Get all option attributes
77
79
  #
78
80
  # @return [Array<Attribute>] the option attributes
79
81
  def option_attributes: () -> Array[Attribute]
80
82
 
81
- # Validate that all required positional arguments are provided.
83
+ # Validate that all required positional arguments are provided
82
84
  #
83
- # @param arguments [Array] the arguments to validate
85
+ # @param arguments [Array<Object>] the arguments to validate
84
86
  #
85
87
  # @raise [ArgumentError] if required arguments are missing
86
88
  # @return [void]
@@ -1,13 +1,15 @@
1
1
  module Domainic
2
2
  module Attributer
3
3
  module DSL
4
- # A class responsible for injecting attribute methods into classes.
4
+ # A class responsible for injecting attribute methods into classes
5
5
  #
6
6
  # This class handles the creation of reader and writer methods for attributes,
7
7
  # ensuring they are injected safely without overwriting existing methods. It
8
8
  # respects visibility settings and properly handles value assignment through
9
- # the attribute system.
9
+ # the attribute system
10
10
  #
11
+ # @api private
12
+ # @!visibility private
11
13
  # @author {https://aaronmallen.me Aaron Allen}
12
14
  # @since 0.1.0
13
15
  class MethodInjector
@@ -15,48 +17,48 @@ module Domainic
15
17
 
16
18
  @base: __todo__
17
19
 
18
- # Inject methods for an attribute into a class.
20
+ # Inject methods for an attribute into a class
19
21
  #
20
22
  # @param base [Class, Module] the class to inject methods into
21
- # @param attribute [Attribute] the attribute to create methods for
23
+ # @param attribute [Attribute] the {Attribute} to create methods for
22
24
  #
23
25
  # @return [void]
24
26
  def self.inject!: (__todo__ base, Attribute attribute) -> void
25
27
 
26
- # Initialize a new MethodInjector.
28
+ # Initialize a new MethodInjector
27
29
  #
28
30
  # @param base [Class, Module] the class to inject methods into
29
- # @param attribute [Attribute] the attribute to create methods for
31
+ # @param attribute [Attribute] the {Attribute} to create methods for
30
32
  #
31
- # @return [void]
33
+ # @return [MethodInjector] the new MethodInjector instance
32
34
  def initialize: (__todo__ base, Attribute attribute) -> void
33
35
 
34
- # Inject reader and writer methods.
36
+ # Inject reader and writer methods
35
37
  #
36
38
  # @return [void]
37
39
  def inject!: () -> void
38
40
 
39
41
  private
40
42
 
41
- # Define a method if it doesn't already exist.
43
+ # Define a method if it doesn't already exist
42
44
  #
43
45
  # @param method_name [Symbol] the name of the method to define
44
- # @yield the method body to define
45
46
  #
47
+ # @yield the method body to define
46
48
  # @return [void]
47
49
  def define_safe_method: (Symbol method_name) { (?) [self: untyped] -> void } -> void
48
50
 
49
- # Inject the attribute reader method.
51
+ # Inject the attribute reader method
50
52
  #
51
- # Creates a reader method with the configured visibility.
53
+ # Creates a reader method with the configured visibility
52
54
  #
53
55
  # @return [void]
54
56
  def inject_reader!: () -> void
55
57
 
56
- # Inject the attribute writer method.
58
+ # Inject the attribute writer method
57
59
  #
58
60
  # Creates a writer method that processes values through the attribute
59
- # system before assignment. Sets the configured visibility.
61
+ # system before assignment. Sets the configured visibility
60
62
  #
61
63
  # @return [void]
62
64
  def inject_writer!: () -> void
@@ -0,0 +1,28 @@
1
+ module Domainic
2
+ module Attributer
3
+ # A specialized error class that combines multiple errors into a single error
4
+ #
5
+ # This class encapsulates multiple errors that occur during a single operation and
6
+ # need to be reported together. It maintains a list of individual errors while providing
7
+ # a formatted message that includes details from all errors
8
+ #
9
+ # @api private
10
+ # @!visibility private
11
+ # @author {https://aaronmallen.me Aaron Allen}
12
+ # @since 0.2.0
13
+ class AggregateError < Error
14
+ # Get the collection of errors that were aggregated
15
+ #
16
+ # @return [Array<StandardError>] the collection of errors
17
+ attr_reader errors: Array[StandardError]
18
+
19
+ # Initialize a new AggregateError instance
20
+ #
21
+ # @param message [String] the main error message
22
+ # @param errors [Array<StandardError>] the collection of errors to aggregate
23
+ #
24
+ # @return [AggregateError] the new AggregateError instance
25
+ def initialize: (String message, Array[StandardError] errors) -> void
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,23 @@
1
+ module Domainic
2
+ module Attributer
3
+ # A specialized error class for callback execution failures
4
+ #
5
+ # This error class is used when one or more callbacks fail during attribute value
6
+ # changes. It aggregates all callback-related errors into a single error with a
7
+ # descriptive message listing each individual failure
8
+ #
9
+ # @author {https://aaronmallen.me Aaron Allen}
10
+ # @since 0.2.0
11
+ class CallbackExecutionError < AggregateError
12
+ # Initialize a new CallbackExecutionError instance
13
+ #
14
+ # @api private
15
+ # @!visibility private
16
+ #
17
+ # @param errors [Array<StandardError>] the collection of callback errors to aggregate
18
+ #
19
+ # @return [CallbackExecutionError] the new CallbackExecutionError instance
20
+ def initialize: (Array[StandardError] errors) -> void
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,29 @@
1
+ module Domainic
2
+ module Attributer
3
+ # A specialized error class for coercion execution failures
4
+ #
5
+ # This error class is used when a coercion fails during attribute value
6
+ # processing. It captures the failing coercer to provide context about which
7
+ # step in the coercion chain caused the failure
8
+ #
9
+ # @author {https://aaronmallen.me Aaron Allen}
10
+ # @since 0.2.0
11
+ class CoercionExecutionError < Error
12
+ # Get the coercer that failed
13
+ #
14
+ # @return [Proc, Symbol] the coercer that failed
15
+ attr_reader coercer: Attribute::Coercer::handler
16
+
17
+ # Initialize a new CoercionExecutionError instance
18
+ #
19
+ # @api private
20
+ # @!visibility private
21
+ #
22
+ # @param message [String] the error message
23
+ # @param coercer [Proc, Symbol] the coercer that failed
24
+ #
25
+ # @return [CoercionExecutionError] the new CoercionExecutionError instance
26
+ def initialize: (String message, Attribute::Coercer::handler coercer) -> void
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,17 @@
1
+ module Domainic
2
+ module Attributer
3
+ # Base error class for all Attributer-related errors
4
+ #
5
+ # This class serves as the foundation for Attributer's error hierarchy, allowing
6
+ # for specific error types to be caught and handled appropriately. All custom
7
+ # errors within the Attributer system should inherit from this class to maintain
8
+ # a consistent error handling pattern
9
+ #
10
+ # @api private
11
+ # @!visibility private
12
+ # @author {https://aaronmallen.me Aaron Allen}
13
+ # @since 0.2.0
14
+ class Error < StandardError
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,23 @@
1
+ module Domainic
2
+ module Attributer
3
+ # A specialized error class for validation execution failures
4
+ #
5
+ # This error class is used when one or more validations encounter errors during
6
+ # their execution. It aggregates all validation-related errors into a single
7
+ # error with a descriptive message listing each individual failure
8
+ #
9
+ # @author {https://aaronmallen.me Aaron Allen}
10
+ # @since 0.2.0
11
+ class ValidationExecutionError < AggregateError
12
+ # Initialize a new ValidationExecutionError instance
13
+ #
14
+ # @api private
15
+ # @!visibility private
16
+ #
17
+ # @param errors [Array<StandardError>] the collection of validation errors to aggregate
18
+ #
19
+ # @return [ValidationExecutionError] the new ValidationExecutionError instance
20
+ def initialize: (Array[StandardError] errors) -> void
21
+ end
22
+ end
23
+ end
@@ -1,10 +1,10 @@
1
1
  module Domainic
2
2
  module Attributer
3
- # A module providing instance-level attribute functionality.
3
+ # A module providing instance-level attribute functionality
4
4
  #
5
- # This module defines instance methods for objects that include Domainic::Attributer.
5
+ # This module defines instance methods for objects that include {Domainic::Attributer}.
6
6
  # It provides initialization handling and attribute serialization capabilities, making
7
- # it easy to work with attribute values in a consistent way.
7
+ # it easy to work with attribute values in a consistent way
8
8
  #
9
9
  # @example Basic usage
10
10
  # class Person
@@ -21,7 +21,7 @@ module Domainic
21
21
  # @author {https://aaronmallen.me Aaron Allen}
22
22
  # @since 0.1.0
23
23
  module InstanceMethods
24
- # Initialize a new instance with attribute values.
24
+ # Initialize a new instance with attribute values
25
25
  #
26
26
  # Handles both positional arguments and keyword options, applying them to their
27
27
  # corresponding attributes. This process includes:
@@ -30,17 +30,20 @@ module Domainic
30
30
  # 3. Type validation and coercion
31
31
  # 4. Change notifications
32
32
  #
33
+ # @example
34
+ # person = Person.new('Alice', age: 30)
35
+ #
33
36
  # @raise [ArgumentError] if required arguments are missing
34
- # @return [void]
37
+ # @return [InstanceMethods] the new InstanceMethods instance
35
38
  def initialize: (*untyped arguments, **untyped keyword_arguments) -> void
36
39
 
37
- # Convert public attribute values to a hash.
40
+ # Convert public attribute values to a hash
38
41
  #
39
42
  # Creates a hash containing all public readable attributes and their current values.
40
43
  # Any attributes marked as private or protected for reading are excluded from
41
- # the result.
44
+ # the result
42
45
  #
43
- # @example Basic conversion
46
+ # @example
44
47
  # person = Person.new('Alice', age: 30)
45
48
  # person.to_h # => { name: 'Alice', age: 30 }
46
49
  #
@@ -1,12 +1,14 @@
1
1
  module Domainic
2
2
  module Attributer
3
- # A singleton object representing an undefined value.
3
+ # A singleton object representing an undefined value
4
4
  #
5
- # This object is used throughout Domainic::Attributer to represent values that
5
+ # This object is used throughout {Domainic::Attributer} to represent values that
6
6
  # are explicitly undefined, as opposed to nil which represents the absence of
7
7
  # a value. It is immutable and implements custom string representations for
8
- # debugging purposes.
8
+ # debugging purposes
9
9
  #
10
+ # @api private
11
+ # @!visibility private
10
12
  # @author {https://aaronmallen.me Aaron Allen}
11
13
  # @since 0.1.0
12
14
  Undefined: Object
@@ -1,69 +1,130 @@
1
1
  module Domainic
2
- # Core functionality for defining and managing Ruby class attributes.
2
+ # `Domainic::Attributer` is a powerful toolkit that brings clarity and safety to your Ruby class attributes.
3
+ # Ever wished your class attributes could:
3
4
  #
4
- # This module provides a flexible attribute system for Ruby classes that supports
5
- # positional arguments and keyword options with features like type validation,
6
- # coercion, and visibility control.
5
+ # * Validate themselves to ensure they only accept correct values?
6
+ # * Transform input data automatically into the right format?
7
+ # * Have clear, enforced visibility rules?
8
+ # * Handle their own default values intelligently?
9
+ # * Tell you when they change?
10
+ # * Distinguish between required arguments and optional settings?
7
11
  #
8
- # Can be included directly with default method names or customized via {Domainic.Attributer}.
12
+ # That's exactly what `Domainic::Attributer` does! It provides a declarative way to define and manage attributes
13
+ # in your Ruby classes, ensuring data integrity and clear interfaces. It's particularly valuable for:
9
14
  #
10
- # @example Basic usage with default method names
11
- # class Person
15
+ # * Domain models and value objects
16
+ # * Service objects and command patterns
17
+ # * Configuration objects
18
+ # * Any class where attribute behavior matters
19
+ #
20
+ # Think of it as giving your attributes a brain - they know what they want, how they should behave, and
21
+ # they're not afraid to speak up when something's not right!
22
+ #
23
+ # @see file:docs/USAGE.md Usage Guide
24
+ # @abstract Can be included directly with default method names or customized via {.Attributer}
25
+ #
26
+ # @example Basic usage
27
+ # class SuperDev
12
28
  # include Domainic::Attributer
13
29
  #
14
- # argument :name
15
- # option :age
30
+ # argument :code_name, String
31
+ #
32
+ # option :power_level, Integer, default: 9000
33
+ # option :favorite_gem do
34
+ # validate_with ->(val) { val.to_s.end_with?('ruby') }
35
+ # coerce_with ->(val) { val.to_s.downcase }
36
+ # non_nilable
37
+ # end
16
38
  # end
17
39
  #
18
- # @example Custom method names
19
- # class Person
20
- # include Domainic.Attributer(argument: :param, option: :opt)
40
+ # dev = SuperDev.new('RubyNinja', favorite_gem: 'RAILS_RUBY')
41
+ # # => #<SuperDev:0x00000001083aeb58 @code_name="RubyNinja", @favorite_gem="rails_ruby", @power_level=9000>
21
42
  #
22
- # param :name
23
- # opt :age
24
- # end
43
+ # dev.favorite_gem # => "rails_ruby"
44
+ # dev.power_level = 9001 # => 9001
45
+ # dev.power_level = 'over 9000'
46
+ # # `SuperDev#power_level`: has invalid value: "over 9000" (ArgumentError)
25
47
  #
26
48
  # @author {https://aaronmallen.me Aaron Allen}
27
49
  # @since 0.1.0
28
50
  module Attributer
29
- # Create a customized Attributer module.
51
+ # Create a customized Attributer module
52
+ #
53
+ # @!visibility private
54
+ # @api private
30
55
  #
31
56
  # @param argument [Symbol, String] custom name for the argument method
32
57
  # @param option [Symbol, String] custom name for the option method
58
+ #
33
59
  # @return [Module] configured Attributer module
34
60
  def self.call: (?argument: (String | Symbol)?, ?option: (String | Symbol)?) -> Module
35
61
 
36
- # Handle direct module inclusion.
62
+ # Handle direct module inclusion
63
+ #
64
+ # @!visibility private
65
+ # @api private
37
66
  #
38
67
  # @param base [Class, Module] the including class/module
68
+ #
39
69
  # @return [void]
40
70
  def self.included: (untyped base) -> void
41
71
 
42
- # Configure base class with Attributer functionality.
72
+ # Configure base class with Attributer functionality
43
73
  #
44
74
  # @param base [Class, Module] the target class/module
45
- # @param options [Hash] method name customization options
75
+ # @param options [Hash{Symbol => String, Symbol}] method name customization options
76
+ #
46
77
  # @return [void]
47
78
  private def self.include_attributer: (untyped base, ?argument: (String | Symbol)?, ?option: (String | Symbol)?) -> void
48
79
 
49
- # Set up custom method names.
80
+ # Set up custom method names
50
81
  #
51
82
  # @param base [Class, Module] the target class/module
52
- # @param options [Hash] method name customization options
83
+ # @param options [Hash{Symbol => String, Symbol}] method name customization options
84
+ #
53
85
  # @return [void]
54
86
  private def self.inject_custom_methods!: (untyped base, ?argument: (String | Symbol)?, ?option: (String | Symbol)?) -> void
55
87
  end
56
88
 
57
- # Create a customized Attributer module.
58
- #
59
- # Provides a convenient way to include Attributer with customized method names.
89
+ # Provides a convenient way to include {Attributer} with customized method names
60
90
  #
61
- # @example
91
+ # @example Customizing method names
62
92
  # class Person
63
93
  # include Domainic.Attributer(argument: :param, option: :opt)
94
+ #
95
+ # param :name, String
96
+ # opt :age, Integer
64
97
  # end
65
98
  #
66
- # @param options [Hash] method name customization options
67
- # @return [Module] configured Attributer module
99
+ # Person.respond_to?(:argument) # => false
100
+ # Person.respond_to?(:param) # => true
101
+ # Person.respond_to?(:option) # => false
102
+ # Person.respond_to?(:opt) # => true
103
+ #
104
+ # person = Person.new('Alice', age: 30)
105
+ # # => #<Person:0x000000010865d188 @age=30, @name="Alice">
106
+ #
107
+ # @example Turning off a method
108
+ #
109
+ # class Person
110
+ # include Domainic.Attributer(argument: nil)
111
+ #
112
+ # option :name, String
113
+ # option :age, Integer
114
+ # end
115
+ #
116
+ # Person.respond_to?(:argument) # => false
117
+ # Person.respond_to?(:option) # => true
118
+ #
119
+ # person = Person.new(name: 'Alice', age: 30)
120
+ # # => #<Person:0x000000010865d188 @age=30, @name="Alice">
121
+ #
122
+ # @param options [Hash{Symbol => String, Symbol, nil}] method name customization options
123
+ # @option options [String, Symbol, nil] :argument custom name for the {Attributer::ClassMethods#argument argument}
124
+ # method. Set to `nil` to disable the method entirely
125
+ # @option options [String, Symbol, nil] :option custom name for the {Attributer::ClassMethods#option option}
126
+ # method. Set to `nil` to disable the method entirely
127
+ #
128
+ # @return [Module] the configured {Attributer} module
68
129
  def self.Attributer: (?argument: (String | Symbol)?, ?option: (String | Symbol)?) -> Module
69
130
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: domainic-attributer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Allen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-12 00:00:00.000000000 Z
11
+ date: 2025-01-01 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Your domain objects deserve better than plain old attributes. Level up
14
14
  your DDD game with powerful, configurable, and well-documented class attributes
@@ -19,9 +19,11 @@ executables: []
19
19
  extensions: []
20
20
  extra_rdoc_files: []
21
21
  files:
22
+ - ".yardopts"
22
23
  - CHANGELOG.md
23
24
  - LICENSE
24
25
  - README.md
26
+ - docs/USAGE.md
25
27
  - lib/domainic-attributer.rb
26
28
  - lib/domainic/attributer.rb
27
29
  - lib/domainic/attributer/attribute.rb
@@ -37,6 +39,11 @@ files:
37
39
  - lib/domainic/attributer/dsl/attribute_builder/option_parser.rb
38
40
  - lib/domainic/attributer/dsl/initializer.rb
39
41
  - lib/domainic/attributer/dsl/method_injector.rb
42
+ - lib/domainic/attributer/errors/aggregate_error.rb
43
+ - lib/domainic/attributer/errors/callback_execution_error.rb
44
+ - lib/domainic/attributer/errors/coercion_execution_error.rb
45
+ - lib/domainic/attributer/errors/error.rb
46
+ - lib/domainic/attributer/errors/validation_execution_error.rb
40
47
  - lib/domainic/attributer/instance_methods.rb
41
48
  - lib/domainic/attributer/undefined.rb
42
49
  - sig/domainic-attributer.rbs
@@ -54,18 +61,24 @@ files:
54
61
  - sig/domainic/attributer/dsl/attribute_builder/option_parser.rbs
55
62
  - sig/domainic/attributer/dsl/initializer.rbs
56
63
  - sig/domainic/attributer/dsl/method_injector.rbs
64
+ - sig/domainic/attributer/errors/aggregate_error.rbs
65
+ - sig/domainic/attributer/errors/callback_execution_error.rbs
66
+ - sig/domainic/attributer/errors/coercion_execution_error.rbs
67
+ - sig/domainic/attributer/errors/error.rbs
68
+ - sig/domainic/attributer/errors/validation_execution_error.rbs
57
69
  - sig/domainic/attributer/instance_methods.rbs
58
70
  - sig/domainic/attributer/undefined.rbs
59
71
  - sig/manifest.yaml
60
- homepage: https://github.com/domainic/domainic/tree/domainic-attributer-v0.1.0/domainic-attributer
72
+ homepage: https://github.com/domainic/domainic/tree/domainic-attributer-v0.2.0/domainic-attributer
61
73
  licenses:
62
74
  - MIT
63
75
  metadata:
64
76
  bug_tracker_uri: https://github.com/domainic/domainic/issues
65
- changelog_uri: https://github.com/domainic/domainic/releases/tag/domainic-attributer-v0.1.0
66
- homepage_uri: https://github.com/domainic/domainic/tree/domainic-attributer-v0.1.0/domainic-attributer
77
+ changelog_uri: https://github.com/domainic/domainic/releases/tag/domainic-attributer-v0.2.0
78
+ documentation_uri: https://rubydoc.info/gems/domainic-attributer/0.2.0
79
+ homepage_uri: https://github.com/domainic/domainic/tree/domainic-attributer-v0.2.0/domainic-attributer
67
80
  rubygems_mfa_required: 'true'
68
- source_code_uri: https://github.com/domainic/domainic/tree/domainic-attributer-v0.1.0/domainic-attributer
81
+ source_code_uri: https://github.com/domainic/domainic/tree/domainic-attributer-v0.2.0/domainic-attributer
69
82
  post_install_message:
70
83
  rdoc_options: []
71
84
  require_paths: