Class: Yoti::DynamicSharingService::WantedAnchorBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/yoti/dynamic_share_service/policy/wanted_anchor.rb

Overview

Builder for WantedAnchor

Instance Method Summary collapse

Constructor Details

#initializeWantedAnchorBuilder

Returns a new instance of WantedAnchorBuilder.



34
35
36
# File 'lib/yoti/dynamic_share_service/policy/wanted_anchor.rb', line 34

def initialize
  @anchor = WantedAnchor.new
end

Instance Method Details

#buildObject



48
49
50
# File 'lib/yoti/dynamic_share_service/policy/wanted_anchor.rb', line 48

def build
  Marshal.load Marshal.dump @anchor
end

#with_sub_type(sub_type = nil) ⇒ Object



43
44
45
46
# File 'lib/yoti/dynamic_share_service/policy/wanted_anchor.rb', line 43

def with_sub_type(sub_type = nil)
  @anchor.instance_variable_set(:@sub_type, sub_type)
  self
end

#with_value(value) ⇒ Object



38
39
40
41
# File 'lib/yoti/dynamic_share_service/policy/wanted_anchor.rb', line 38

def with_value(value)
  @anchor.instance_variable_set(:@value, value)
  self
end