Module: Roda::RodaPlugins::Presenters::InstanceMethods
- Defined in:
- lib/roda/plugins/presenters.rb
Instance Method Summary collapse
-
#present(object, **options) ⇒ Object
Find the presenter for the given
object
and apply it with the givenoptions
. -
#present_collection(object, **options) ⇒ Object
Find the presenter for the given
object
and apply it with the givenoptions
.
Instance Method Details
#present(object, **options) ⇒ Object
Find the presenter for the given object
and apply it with the given options
. Raises an exception if no presenter can be found.
38 39 40 41 |
# File 'lib/roda/plugins/presenters.rb', line 38 def present( object, ** ) mod = self.class.presenter_collection return mod.present( object, ** ) end |
#present_collection(object, **options) ⇒ Object
Find the presenter for the given object
and apply it with the given options
. Raises an exception if no presenter can be found.
46 47 48 49 |
# File 'lib/roda/plugins/presenters.rb', line 46 def present_collection( object, ** ) mod = self.class.presenter_collection return mod.present_collection( object, ** ) end |