Class: Yes::Core::Aggregate::Dsl::AttributeDefiners::Standard

Inherits:
Object
  • Object
show all
Defined in:
lib/yes/core/aggregate/dsl/attribute_definers/standard.rb

Overview

Handles the definition and generation of standard attribute-related classes and methods

Since:

  • 0.1.0

Instance Method Summary collapse

Constructor Details

#initialize(attribute_data) ⇒ Base

Initializes a new Base instance

Parameters:

  • attribute_data (AttributeData)

    the data object containing attribute configuration

Since:

  • 0.1.0



19
20
21
# File 'lib/yes/core/aggregate/dsl/attribute_definers/standard.rb', line 19

def initialize(attribute_data)
  @attribute_data = attribute_data
end

Instance Method Details

#call { ... } ⇒ void

This method returns an undefined value.

Generates and registers all necessary classes for the attribute.

Yields:

  • Block for defining guards and other attribute configurations

Yield Returns:

  • (void)

Since:

  • 0.1.0



28
29
30
# File 'lib/yes/core/aggregate/dsl/attribute_definers/standard.rb', line 28

def call
  MethodDefiners::Attribute::Accessor.new(attribute_data).call
end