Class: Prototok::Token
- Inherits:
-
Struct
- Object
- Struct
- Prototok::Token
- Extended by:
- Utils::TypeAttributes
- Defined in:
- lib/prototok/token.rb
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Token
constructor
A new instance of Token.
- #update!(opts = {}) ⇒ Object
Methods included from Utils::TypeAttributes
Constructor Details
#initialize(opts = {}) ⇒ Token
Returns a new instance of Token.
16 17 18 19 |
# File 'lib/prototok/token.rb', line 16 def initialize opts={} super() update!(opts) end |
Instance Method Details
#update!(opts = {}) ⇒ Object
28 29 30 31 |
# File 'lib/prototok/token.rb', line 28 def update! opts={} opts.each{|k,v| self.send "#{k}=", v} self end |