Class: Prototok::Token

Inherits:
Struct
  • Object
show all
Extended by:
Utils::TypeAttributes
Defined in:
lib/prototok/token.rb

Instance Method Summary collapse

Methods included from Utils::TypeAttributes

type

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