Module: GSGraph::Connections::Noreply

Included in:
Event
Defined in:
lib/gs_graph/connections/noreply.rb

Instance Method Summary collapse

Instance Method Details

#noreply(options = {}) ⇒ Object Also known as: no_reply



4
5
6
7
8
9
10
11
# File 'lib/gs_graph/connections/noreply.rb', line 4

def noreply(options = {})
  members = self.connection :noreply, options
  members.map! do |member|
    User.new member[:id], member.merge(
      :access_token => options[:access_token] || self.access_token
    )
  end
end

#noreply?(user, options = {}) ⇒ Boolean Also known as: no_reply?

Returns:

  • (Boolean)


14
15
16
17
18
19
# File 'lib/gs_graph/connections/noreply.rb', line 14

def noreply?(user, options = {})
  member = self.connection(
    :noreply, options.merge(:connection_scope => user.identifier)
  ).first
  member.present?
end