Class: Mpp::Methods::Tempo::Schemas::HashCredentialPayload
- Inherits:
-
Data
- Object
- Data
- Mpp::Methods::Tempo::Schemas::HashCredentialPayload
- Defined in:
- lib/mpp/methods/tempo/schemas.rb
Instance Attribute Summary collapse
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type:, hash:) ⇒ HashCredentialPayload
constructor
A new instance of HashCredentialPayload.
Constructor Details
#initialize(type:, hash:) ⇒ HashCredentialPayload
Returns a new instance of HashCredentialPayload.
51 52 53 54 55 56 |
# File 'lib/mpp/methods/tempo/schemas.rb', line 51 def initialize(type:, hash:) raise ArgumentError, "type must be 'hash'" unless type == "hash" raise ArgumentError, "hash must be a hex string" unless hash.match?(HEX_PATTERN) super end |
Instance Attribute Details
#hash ⇒ Object (readonly)
Returns the value of attribute hash
50 51 52 |
# File 'lib/mpp/methods/tempo/schemas.rb', line 50 def hash @hash end |
#type ⇒ Object (readonly)
Returns the value of attribute type
50 51 52 |
# File 'lib/mpp/methods/tempo/schemas.rb', line 50 def type @type end |