lib/alba/conditional_attribute.rb in alba-2.3.0 vs lib/alba/conditional_attribute.rb in alba-2.4.0
- old
+ new
@@ -1,9 +1,10 @@
require_relative 'association'
require_relative 'constants'
module Alba
# Represents attribute with `if` option
+ # @api private
class ConditionalAttribute
# @param body [Symbol, Proc, Alba::Association, Alba::TypedAttribute] real attribute wrapped with condition
# @param condition [Symbol, Proc] condition to check
def initialize(body:, condition:)
@body = body