| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
に要求されるいくつかのメソッドが定義される。 |
| 5 |
|
| 6 |
module Diva::Model::UserMixin |
| 7 |
def user |
| 8 |
self |
| 9 |
end |
| 10 |
|
| 11 |
def icon |
| 12 |
Plugin.collect(:photo_filter, profile_image_url, Pluggaloid::COLLECT).map { |photo| |
| 13 |
Plugin.filtering(:miracle_icon_filter, photo)[0] |
| 14 |
}.first |
| 15 |
end |
| 16 |
|
| 17 |
def icon_large |
| 18 |
Plugin.collect(:photo_filter, profile_image_url_large, Pluggaloid::COLLECT).lazy.map { |photo| |
| 19 |
truth = Plugin.filtering(:miracle_icon_filter, photo)[0] |
| 20 |
if photo == truth |
| 21 |
truth |
| 22 |
else |
| 23 |
icon |
| 24 |
end |
| 25 |
}.first |
| 26 |
end |
| 27 |
|
| 28 |
def profile_image_url_large |
| 29 |
profile_image_url |
| 30 |
end |
| 31 |
|
| 32 |
def verified? |
| 33 |
false |
| 34 |
end |
| 35 |
|
| 36 |
def protected? |
| 37 |
false |
| 38 |
end |
| 39 |
end |