Class: Maia::Token
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(token) ⇒ Token
constructor
A new instance of Token.
- #to_h ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(token) ⇒ Token
Returns a new instance of Token.
5 6 7 |
# File 'lib/maia/token.rb', line 5 def initialize(token) @token = token end |
Instance Method Details
#each(&block) ⇒ Object
9 10 11 |
# File 'lib/maia/token.rb', line 9 def each(&block) [self].each(&block) end |
#to_h ⇒ Object
17 18 19 |
# File 'lib/maia/token.rb', line 17 def to_h { token: @token } end |
#to_s ⇒ Object
13 14 15 |
# File 'lib/maia/token.rb', line 13 def to_s @token end |