class AppMail::MessageScope
Attributes
client[R]
Public Class Methods
new(client)
click to toggle source
# File lib/app_mail/message_scope.rb, line 8 def initialize(client) @client = client @includes = [] end
Public Instance Methods
expansions()
click to toggle source
Return the current includes
# File lib/app_mail/message_scope.rb, line 24 def expansions if @includes.include?(:all) true else @includes.map(&:to_s) end end
find_by_id(id)
click to toggle source
Find a given message by its ID
# File lib/app_mail/message_scope.rb, line 35 def find_by_id(id) Message.find_with_scope(self, id) end
includes(*includes)
click to toggle source
Add includes to the scope
# File lib/app_mail/message_scope.rb, line 16 def includes(*includes) @includes.push(*includes) self end