Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement setters and getters #21

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

afuno
Copy link
Member

@afuno afuno commented Jun 6, 2024

No description provided.

Added getter and setter Domain Specific Language (DSL) as features to the Datory framework. This change includes creation of new files for getter, setter, and their collection classes. Moreover, adjustments were made in the test files and examples to demonstrate the usage of these newly added features.
@afuno afuno added the feature label Jun 6, 2024
@afuno afuno added this to the v1.0.0 milestone Jun 6, 2024
@afuno afuno self-assigned this Jun 6, 2024
afuno added 2 commits June 6, 2024 22:10
Changed attribute name 'formatted_title' to 'formattedTitle' in both product.rb file and product_spec.rb test file. The renaming is consistent with camelCase naming convention, improving readability and standardizing the codebase.
The find_by method in both the setters/collection.rb and getters/collection.rb files has been commented out and is no longer in use. This commit removes these unnecessary lines of code, thus cleaning up the codebase.
@afuno afuno modified the milestones: v1.0.0, v1.2.0 Jul 26, 2024
@afuno afuno removed this from the v1.2.0 milestone Aug 29, 2024
…ures/SRV-111/setter_and_getter

# Conflicts:
#	lib/datory/context/workspace.rb
Moved the `add` method logic into a private method `define_setter` to enhance encapsulation within the `Model` class. Updated all usages of the `add` method to call `define_setter` instead, ensuring the setter is defined privately across different classes.
This commit introduces a new 'code' attribute to the season model, derived from the season number. Modifications include updating the schema and test cases to accommodate the new attribute. These changes ensure that each season has a unique code based on its number.
This new method extracts and returns the names from the `from` attributes within the collection. It complements the existing method that fetches the `to` names, enhancing the overall utility of attribute name extraction within the `Collection` class.
Refactor methods in Model and Callable to include `collection_of_attributes` for more robust attribute management. Adjust build method to handle additional attributes, ensuring complete initialization. Update related methods to pass and process `collection_of_attributes` accordingly.
Added comments to indicate that 'getter' methods are for deserialization and 'setter' methods are for serialization in product.rb and season.rb files. This enhances code readability and makes the purpose of these methods clearer.
Added the fullName attribute to language_spec.rb and language.rb to handle serialization and deserialization, ensuring that the full attribute details are included in the outputs and test cases. Also updated the descriptor to handle the presence of include_class correctly.
@afuno afuno modified the milestones: v2.2.0, v2.3.0 Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant