Class: Decidim::Dev::OfficialAuthorPresenter
- Inherits:
-
Object
- Object
- Decidim::Dev::OfficialAuthorPresenter
show all
- Defined in:
- app/presenters/decidim/dev/official_author_presenter.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
22
23
24
25
26
27
28
29
30
|
# File 'app/presenters/decidim/dev/official_author_presenter.rb', line 22
def method_missing(method, *args)
if method.to_s.ends_with?("?")
false
elsif [:avatar_url, :profile_path, :badge, :followers_count, :cache_key_with_version].include?(method)
""
else
super
end
end
|
Instance Method Details
#deleted? ⇒ Boolean
14
15
16
|
# File 'app/presenters/decidim/dev/official_author_presenter.rb', line 14
def deleted?
false
end
|
#name ⇒ Object
6
7
8
|
# File 'app/presenters/decidim/dev/official_author_presenter.rb', line 6
def name
self.class.name
end
|
#nickname ⇒ Object
10
11
12
|
# File 'app/presenters/decidim/dev/official_author_presenter.rb', line 10
def nickname
Decidim::UserBaseEntity.nicknamize(name)
end
|
#respond_to_missing? ⇒ Boolean
18
19
20
|
# File 'app/presenters/decidim/dev/official_author_presenter.rb', line 18
def respond_to_missing?(*)
true
end
|