Exception: UUID::NCName::AmbiguousToken
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- UUID::NCName::AmbiguousToken
- Defined in:
- lib/uuid/ncname.rb
Overview
This error gets thrown when a UUID-NCName token can't be positively determined to be one version or the other.
Instance Attribute Summary collapse
-
#token ⇒ String
readonly
The ambiguous token.
-
#v0 ⇒ String
readonly
The UUID when decoded using version 0.
-
#v1 ⇒ String
readonly
The UUID when decoded using version 1.
Instance Method Summary collapse
-
#initialize(token, v0: nil, v1: nil) ⇒ AmbiguousToken
constructor
A new instance of AmbiguousToken.
Constructor Details
#initialize(token, v0: nil, v1: nil) ⇒ AmbiguousToken
Returns a new instance of AmbiguousToken.
196 197 198 199 |
# File 'lib/uuid/ncname.rb', line 196 def initialize token, v0: nil, v1: nil @v0 = v0 || from_ncname(token, version: 0) @v1 = v1 || from_ncname(token, version: 1) end |
Instance Attribute Details
#token ⇒ String (readonly)
Returns The ambiguous token.
186 187 188 |
# File 'lib/uuid/ncname.rb', line 186 def token @token end |
#v0 ⇒ String (readonly)
Returns The UUID when decoded using version 0.
188 189 190 |
# File 'lib/uuid/ncname.rb', line 188 def v0 @v0 end |
#v1 ⇒ String (readonly)
Returns The UUID when decoded using version 1.
190 191 192 |
# File 'lib/uuid/ncname.rb', line 190 def v1 @v1 end |