Class: Sinatra::FacebookObject::APIProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/sinbook.rb

Constant Summary collapse

Types =
%w[
  admin
  application
  auth
  batch
  comments
  connect
  data
  events
  fbml
  feed
  fql
  friends
  groups
  links
  liveMessage
  notes
  notifications
  pages
  photos
  profile
  sms
  status
  stream
  users
  video
]

Instance Method Summary collapse

Constructor Details

#initialize(name, obj) ⇒ APIProxy

Returns a new instance of APIProxy.



169
170
171
# File 'lib/sinbook.rb', line 169

def initialize name, obj
  @name, @obj = name, obj
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, opts = {}) ⇒ Object



173
174
175
# File 'lib/sinbook.rb', line 173

def method_missing method, opts = {}
  @obj.request "#{@name}.#{method}", opts
end