Class: Stormpath::Rails::ProfileSerializer
- Inherits:
-
Object
- Object
- Stormpath::Rails::ProfileSerializer
- Defined in:
- app/serializers/stormpath/rails/profile_serializer.rb
Instance Attribute Summary collapse
-
#account_href ⇒ Object
readonly
Returns the value of attribute account_href.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(account) ⇒ ProfileSerializer
constructor
A new instance of ProfileSerializer.
- #to_h ⇒ Object
Constructor Details
#initialize(account) ⇒ ProfileSerializer
Returns a new instance of ProfileSerializer.
10 11 12 |
# File 'app/serializers/stormpath/rails/profile_serializer.rb', line 10 def initialize(account) @account_href = account.href end |
Instance Attribute Details
#account_href ⇒ Object (readonly)
Returns the value of attribute account_href.
4 5 6 |
# File 'app/serializers/stormpath/rails/profile_serializer.rb', line 4 def account_href @account_href end |
Class Method Details
.to_h(account) ⇒ Object
6 7 8 |
# File 'app/serializers/stormpath/rails/profile_serializer.rb', line 6 def self.to_h(account) new(account).to_h end |
Instance Method Details
#to_h ⇒ Object
14 15 16 |
# File 'app/serializers/stormpath/rails/profile_serializer.rb', line 14 def to_h @to_h ||= AccountSerializer.to_h(account).deep_merge(account: ) end |