Class: DIDX::Document
- Inherits:
-
Object
- Object
- DIDX::Document
- Defined in:
- lib/didx/document.rb
Instance Attribute Summary collapse
-
#assertion_method ⇒ Object
readonly
Returns the value of attribute assertion_method.
-
#authentication ⇒ Object
readonly
Returns the value of attribute authentication.
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#document ⇒ Object
readonly
Returns the value of attribute document.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#service ⇒ Object
readonly
Returns the value of attribute service.
-
#verification_method ⇒ Object
readonly
Returns the value of attribute verification_method.
Instance Method Summary collapse
-
#initialize(document_json_string) ⇒ Document
constructor
A new instance of Document.
Constructor Details
#initialize(document_json_string) ⇒ Document
Returns a new instance of Document.
7 8 9 10 11 12 13 14 15 |
# File 'lib/didx/document.rb', line 7 def initialize(document_json_string) @document = JSON.parse(document_json_string) @context = document["@context"] @id = document["id"] @service = document["service"] @verification_method = document["verificationMethod"] @authentication = document["authentication"] @assertion_method = document["assertionMethod"] end |
Instance Attribute Details
#assertion_method ⇒ Object (readonly)
Returns the value of attribute assertion_method.
4 5 6 |
# File 'lib/didx/document.rb', line 4 def assertion_method @assertion_method end |
#authentication ⇒ Object (readonly)
Returns the value of attribute authentication.
4 5 6 |
# File 'lib/didx/document.rb', line 4 def authentication @authentication end |
#context ⇒ Object (readonly)
Returns the value of attribute context.
4 5 6 |
# File 'lib/didx/document.rb', line 4 def context @context end |
#document ⇒ Object (readonly)
Returns the value of attribute document.
4 5 6 |
# File 'lib/didx/document.rb', line 4 def document @document end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/didx/document.rb', line 4 def id @id end |
#service ⇒ Object (readonly)
Returns the value of attribute service.
4 5 6 |
# File 'lib/didx/document.rb', line 4 def service @service end |
#verification_method ⇒ Object (readonly)
Returns the value of attribute verification_method.
4 5 6 |
# File 'lib/didx/document.rb', line 4 def verification_method @verification_method end |