Class: Decidim::DummyResources::OfficialAuthorPresenter
- Inherits:
-
Object
- Object
- Decidim::DummyResources::OfficialAuthorPresenter
show all
- Defined in:
- lib/decidim/dev/test/rspec_support/component.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
169
170
171
172
173
174
175
176
177
|
# File 'lib/decidim/dev/test/rspec_support/component.rb', line 169
def method_missing(method, *args)
if method.to_s.ends_with?("?")
false
elsif [:avatar_url, :profile_path, :badge, :followers_count].include?(method)
""
else
super
end
end
|
Instance Method Details
#deleted? ⇒ Boolean
161
162
163
|
# File 'lib/decidim/dev/test/rspec_support/component.rb', line 161
def deleted?
false
end
|
#name ⇒ Object
153
154
155
|
# File 'lib/decidim/dev/test/rspec_support/component.rb', line 153
def name
self.class.name
end
|
#nickname ⇒ Object
157
158
159
|
# File 'lib/decidim/dev/test/rspec_support/component.rb', line 157
def nickname
UserBaseEntity.nicknamize(name)
end
|
#respond_to_missing? ⇒ Boolean
165
166
167
|
# File 'lib/decidim/dev/test/rspec_support/component.rb', line 165
def respond_to_missing?
true
end
|