Class: Xhive::BasePresenter
- Inherits:
-
Object
- Object
- Xhive::BasePresenter
- Includes:
- ActionView::Context, ActionView::Helpers
- Defined in:
- app/presenters/xhive/base_presenter.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(object) ⇒ BasePresenter
constructor
A new instance of BasePresenter.
- #safe_user ⇒ Object
Constructor Details
#initialize(object) ⇒ BasePresenter
Returns a new instance of BasePresenter.
12 13 14 |
# File 'app/presenters/xhive/base_presenter.rb', line 12 def initialize(object) @object = object end |
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
3 4 5 |
# File 'app/presenters/xhive/base_presenter.rb', line 3 def object @object end |
Instance Method Details
#id ⇒ Object
16 17 18 |
# File 'app/presenters/xhive/base_presenter.rb', line 16 def id @object.id end |
#safe_user ⇒ Object
20 21 22 |
# File 'app/presenters/xhive/base_presenter.rb', line 20 def safe_user controller.try(:safe_user).try(:presenter) end |