Class: Yoti::Sandbox::Profile::AttributeDefinition
- Inherits:
-
Object
- Object
- Yoti::Sandbox::Profile::AttributeDefinition
- Defined in:
- lib/yoti_sandbox/profile/third_party.rb
Overview
Provides a single attribute definition.
Instance Method Summary collapse
- #as_json(*_args) ⇒ Object
-
#initialize(name) ⇒ AttributeDefinition
constructor
A new instance of AttributeDefinition.
- #to_json(*_args) ⇒ Object
Constructor Details
#initialize(name) ⇒ AttributeDefinition
Returns a new instance of AttributeDefinition.
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 |