Skip to content

Attribute's default_value can be modified #69

Closed
@natesalisbury

Description

@natesalisbury

It's possible to modify an attribute's default_value and have those modifications carry over to new instances of the model.

Example:

class MyModel
  include Aws::Record

  map_attr :things, default_value: {}
end
> MyModel.new.things[:foo] = :bar
=> :bar
> MyModel.new.things
=> {:foo=>:bar}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions