lib/alba/nested_attribute.rb in alba-3.1.0 vs lib/alba/nested_attribute.rb in alba-3.2.0
- old
+ new
@@ -1,8 +1,11 @@
module Alba
# Representing nested attribute
# @api private
class NestedAttribute
+ # Setter for key_transformation, used when it's changed after class definition
+ attr_writer :key_transformation
+
# @param key_transformation [Symbol] determines how to transform keys
# @param block [Proc] class body
def initialize(key_transformation: :none, &block)
@key_transformation = key_transformation
@block = block