module Diva::Model::UserMixin

Model用のmoduleで、これをincludeするとUserに要求されるいくつかのメソッドが定義される。

Public Instance Methods

icon() click to toggle source
# File core/lib/diva_hacks/mixin/user_mixin.rb, line 10
def icon
  Enumerator.new{|y|
    Plugin.filtering(:photo_filter, profile_image_url, y)
  }.map{|photo|
    Plugin.filtering(:miracle_icon_filter, photo)[0]
  }.first
end
icon_large() click to toggle source
# File core/lib/diva_hacks/mixin/user_mixin.rb, line 18
def icon_large
  Enumerator.new{|y|
    Plugin.filtering(:photo_filter, profile_image_url_large, y)
  }.map{|photo|
    truth = Plugin.filtering(:miracle_icon_filter, photo)[0]
    if photo == truth
      truth
    else
      icon
    end
  }.first
end
profile_image_url_large() click to toggle source
# File core/lib/diva_hacks/mixin/user_mixin.rb, line 31
def profile_image_url_large
  profile_image_url
end
protected?() click to toggle source
# File core/lib/diva_hacks/mixin/user_mixin.rb, line 39
def protected?
  false
end
user() click to toggle source
# File core/lib/diva_hacks/mixin/user_mixin.rb, line 6
def user
  self
end
verified?() click to toggle source
# File core/lib/diva_hacks/mixin/user_mixin.rb, line 35
def verified?
  false
end