Module: GSGraph::Connections::Accounts
- Included in:
- Application, User
- Defined in:
- lib/gs_graph/connections/accounts.rb
Instance Method Summary collapse
Instance Method Details
#accounts(options = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/gs_graph/connections/accounts.rb', line 4 def accounts( = {}) accounts = self.connection :accounts, accounts.map! do |account| account[:access_token] ||= [:access_token] || self.access_token case self when User if account[:category] == 'Application' account.delete(:category) Application.new account[:id], account else Page.new account[:id], account end when Application TestUser.new account[:id], account end end end |