Class: Display
- Inherits:
-
Object
- Object
- Display
- Defined in:
- lib/zipmark/display.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
-
#data ⇒ Object
Returns the value of attribute data.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Display
constructor
A new instance of Display.
- #token ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Display
Returns a new instance of Display.
4 5 6 7 8 |
# File 'lib/zipmark/display.rb', line 4 def initialize( = {}) self.client = [:client] self.data = [:data] self.name = [:name] end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
2 3 4 |
# File 'lib/zipmark/display.rb', line 2 def client @client end |
#data ⇒ Object
Returns the value of attribute data.
2 3 4 |
# File 'lib/zipmark/display.rb', line 2 def data @data end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/zipmark/display.rb', line 2 def name @name end |
Instance Method Details
#token ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/zipmark/display.rb', line 10 def token JWT.encode( { display: name, application_id: client.adapter.username, iat: Time.now.to_i, data: data }, client.adapter.password ) end |