Class: OctopusAuth::Decorators::Default
- Inherits:
-
Object
- Object
- OctopusAuth::Decorators::Default
- Defined in:
- lib/octopus_auth/decorators/default.rb
Instance Method Summary collapse
-
#initialize(token_model) ⇒ Default
constructor
A new instance of Default.
- #to_h ⇒ Object (also: #to_hash)
Constructor Details
#initialize(token_model) ⇒ Default
Returns a new instance of Default.
4 5 6 |
# File 'lib/octopus_auth/decorators/default.rb', line 4 def initialize(token_model) @token_model = token_model end |
Instance Method Details
#to_h ⇒ Object Also known as: to_hash
14 15 16 17 18 19 20 |
# File 'lib/octopus_auth/decorators/default.rb', line 14 def to_h OctopusAuth::Decorators::ATTRIBUTES.inject({}) do |carry, item| carry[item] = @token_model.send(item) carry end end |