Module: FbGraph::Connections::Roles
- Included in:
- Application
- Defined in:
- lib/fb_graph/connections/roles.rb
Instance Method Summary collapse
- #admin!(user, options = {}) ⇒ Object
- #developer!(user, options = {}) ⇒ Object
- #insights_user!(user, options = {}) ⇒ Object
- #role!(user, options = {}) ⇒ Object
- #roles(options = {}) ⇒ Object
- #tester!(user, options = {}) ⇒ Object
- #unrole!(user, options = {}) ⇒ Object
Instance Method Details
#admin!(user, options = {}) ⇒ Object
11 12 13 |
# File 'lib/fb_graph/connections/roles.rb', line 11 def admin!(user, = {}) role! user, .merge(:role => 'administrators') end |
#developer!(user, options = {}) ⇒ Object
15 16 17 |
# File 'lib/fb_graph/connections/roles.rb', line 15 def developer!(user, = {}) role! user, .merge(:role => 'developers') end |
#insights_user!(user, options = {}) ⇒ Object
23 24 25 |
# File 'lib/fb_graph/connections/roles.rb', line 23 def insights_user!(user, = {}) role! user, .merge(:role => 'insights users') end |
#role!(user, options = {}) ⇒ Object
27 28 29 |
# File 'lib/fb_graph/connections/roles.rb', line 27 def role!(user, = {}) post .merge(:user => user.identifier, :connection => :roles) end |
#roles(options = {}) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/fb_graph/connections/roles.rb', line 4 def roles( = {}) roles = self.connection :roles, roles.map! do |role| Role.new role end end |
#tester!(user, options = {}) ⇒ Object
19 20 21 |
# File 'lib/fb_graph/connections/roles.rb', line 19 def tester!(user, = {}) role! user, .merge(:role => 'testers') end |
#unrole!(user, options = {}) ⇒ Object
31 32 33 |
# File 'lib/fb_graph/connections/roles.rb', line 31 def unrole!(user, = {}) delete .merge(:user => user.identifier, :connection => :roles) end |