Class: Stormpath::Rails::ProfileSerializer

Inherits:
Object
  • Object
show all
Defined in:
app/serializers/stormpath/rails/profile_serializer.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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_href = .href
end

Instance Attribute Details

#account_hrefObject (readonly)

Returns the value of attribute account_href.



4
5
6
# File 'app/serializers/stormpath/rails/profile_serializer.rb', line 4

def 
  @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()
  new().to_h
end

Instance Method Details

#to_hObject



14
15
16
# File 'app/serializers/stormpath/rails/profile_serializer.rb', line 14

def to_h
  @to_h ||= AccountSerializer.to_h().deep_merge(account: expanded_resources_hash)
end