Class: ReplIdentity::Token
- Inherits:
-
Object
- Object
- ReplIdentity::Token
- Defined in:
- lib/repl_identity/token.rb
Instance Method Summary collapse
-
#initialize(audience) ⇒ Token
constructor
A new instance of Token.
- #to_s ⇒ Object
Constructor Details
#initialize(audience) ⇒ Token
Returns a new instance of Token.
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/repl_identity/token.rb', line 3 def initialize(audience) token, status = Open3.capture2( REPLIT_CLI_PATH, "identity", "create", "-audience=#{audience}" ) raise "Something went wrong" unless status.success? @token = token.strip end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/repl_identity/token.rb', line 14 def to_s @token end |