class Yoti::DynamicSharingService::WantedAttribute
Describes a wanted attribute in a dynamic sharing policy
Attributes
constraints[R]
@return [Array<#as_json>]
derivation[R]
@return [String]
name[R]
@return [String]
Public Class Methods
builder()
click to toggle source
# File lib/yoti/dynamic_share_service/policy/wanted_attribute.rb, line 40 def self.builder WantedAttributeBuilder.new end
new()
click to toggle source
# File lib/yoti/dynamic_share_service/policy/wanted_attribute.rb, line 16 def initialize @constraints = [] end
Public Instance Methods
accept_self_asserted()
click to toggle source
# File lib/yoti/dynamic_share_service/policy/wanted_attribute.rb, line 20 def accept_self_asserted return true if @accept_self_asserted false end
as_json(*_args)
click to toggle source
# File lib/yoti/dynamic_share_service/policy/wanted_attribute.rb, line 30 def as_json(*_args) obj = { name: @name } obj[:derivation] = @derivation if derivation obj[:accept_self_asserted] = @accept_self_asserted if accept_self_asserted obj[:constraints] = @constraints.map(&:as_json) unless constraints.empty? obj end
to_json(*_args)
click to toggle source
# File lib/yoti/dynamic_share_service/policy/wanted_attribute.rb, line 26 def to_json(*_args) as_json.to_json end