Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Set of enum #2

@sled

Description

@sled

A flood of questions:

  • How can we realise something like a set of a specific type, i.e
    attribute :selected_months, :set, class_name: Porro::Types::Enum.new(1..12)
  • How to set a default value for an attribute, e.g
    attribute :something, :string, default: 'a meaningful default'
  • Shouldn't we initialize an empty collection by default, e.g
    attribute :friends, :set, class_name: :string causes an_instance.friends to return nil wouldn't it make more sense to have something like an_instance.friends << "barry the dog"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions