class Mikutter::Twitter::DirectMessage

Public Class Methods

memory() click to toggle source
# File core/directmessage.rb, line 23
def self.memory
  @memory ||= DirectMessageMemory.new end

Public Instance Methods

from_me?() click to toggle source
# File core/directmessage.rb, line 34
def from_me?
  return false if system?
  Service.map(&:user_obj).include?(self[:user])
end
mentioned_by_me?() click to toggle source
# File core/directmessage.rb, line 26
def mentioned_by_me?
  false
end
post(args, &block) click to toggle source
# File core/directmessage.rb, line 43
def post(args, &block)
  Service.primary.send_direct_message({:text => args[:message], :user => self[:user]}, &block)
end
receive_user_screen_names() click to toggle source
# File core/directmessage.rb, line 51
def receive_user_screen_names
  [self[:recipient].idname]
end
repliable?() click to toggle source
# File core/directmessage.rb, line 47
def repliable?
  true
end
to_me?() click to toggle source
# File core/directmessage.rb, line 39
def to_me?
  true
end
to_show() click to toggle source
# File core/directmessage.rb, line 30
def to_show
  @to_show ||= self[:text].gsub(/&(gt|lt|quot|amp);/){|m| {'gt' => '>', 'lt' => '<', 'quot' => '"', 'amp' => '&'}[$1] }.freeze
end