Class: Yoti::Sandbox::Profile::AttributeDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/yoti_sandbox/profile/third_party.rb

Overview

Provides a single attribute definition.

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ AttributeDefinition

Returns a new instance of AttributeDefinition.

Parameters:

  • name (String)


141
142
143
144
# File 'lib/yoti_sandbox/profile/third_party.rb', line 141

def initialize(name)
  Validation.assert_is_a(String, name, 'name')
  @name = name
end

Instance Method Details

#as_json(*_args) ⇒ Object



150
151
152
153
154
# File 'lib/yoti_sandbox/profile/third_party.rb', line 150

def as_json(*_args)
  {
    name: @name
  }
end

#to_json(*_args) ⇒ Object



146
147
148
# File 'lib/yoti_sandbox/profile/third_party.rb', line 146

def to_json(*_args)
  as_json.to_json
end