Module: FbGraph::Connections::QuestionOptions

Included in:
Question
Defined in:
lib/fb_graph/connections/question_options.rb

Instance Method Summary collapse

Instance Method Details

#options(opts = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/fb_graph/connections/question_options.rb', line 4

def options(opts = {})
  question_options = if @_options_ && opts.blank?
    self.connection(:question_options, opts.merge(:cached_collection => @_options_))
  else
    self.connection(:question_options, opts)
  end
  question_options.map! do |option|
    QuestionOption.new(option[:id], option.merge(
      :access_token => opts[:access_token] || self.access_token
    ))
  end
end