Class: HasHelpers::Resource::CellPresenter
- Inherits:
-
BasePresenter
- Object
- BasePresenter
- HasHelpers::Resource::CellPresenter
- Defined in:
- app/presenters/has_helpers/resource/cell_presenter.rb
Instance Attribute Summary collapse
-
#blank ⇒ Object
When set to true no output is generated for the content of the current cell.
-
#colspan ⇒ Object
When set to true no output is generated for the content of the current cell.
-
#current_user ⇒ Object
writeonly
Setting template will cause rendering to use a custom partial.
-
#is_header ⇒ Object
When set to true no output is generated for the content of the current cell.
-
#is_primary ⇒ Object
When set to true no output is generated for the content of the current cell.
-
#is_service_external ⇒ Object
When set to true no output is generated for the content of the current cell.
-
#is_text ⇒ Object
When set to true no output is generated for the content of the current cell.
-
#primary_title ⇒ Object
When set to true no output is generated for the content of the current cell.
-
#resource ⇒ Object
writeonly
Content attributes
value,resourceandtags. -
#service ⇒ Object
When set to true no output is generated for the content of the current cell.
-
#service_title ⇒ Object
When set to true no output is generated for the content of the current cell.
-
#tags ⇒ Object
tagswill generate an unordered list using the collection it is set to. - #template ⇒ Object
-
#value ⇒ Object
writeonly
Content attributes
value,resourceandtags. -
#warning ⇒ Object
When set to true no output is generated for the content of the current cell.
Attributes inherited from BasePresenter
Instance Method Summary collapse
-
#content ⇒ Object
Returns the content from either
valueor resource.
Methods inherited from BasePresenter
#==, #error_on, #initialize, wrap, wrap_with_options
Methods included from Attributes
Constructor Details
This class inherits a constructor from HasHelpers::BasePresenter
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class HasHelpers::BasePresenter
Instance Attribute Details
#blank ⇒ Object
When set to true no output is generated for the content of the current cell. Without this option
9 10 11 |
# File 'app/presenters/has_helpers/resource/cell_presenter.rb', line 9 def blank @blank end |
#colspan ⇒ Object
When set to true no output is generated for the content of the current cell. Without this option
9 10 11 |
# File 'app/presenters/has_helpers/resource/cell_presenter.rb', line 9 def colspan @colspan end |
#current_user=(value) ⇒ Object (writeonly)
Setting template will cause rendering to use a custom partial
20 21 22 |
# File 'app/presenters/has_helpers/resource/cell_presenter.rb', line 20 def current_user=(value) @current_user = value end |
#is_header ⇒ Object
When set to true no output is generated for the content of the current cell. Without this option
9 10 11 |
# File 'app/presenters/has_helpers/resource/cell_presenter.rb', line 9 def is_header @is_header end |
#is_primary ⇒ Object
When set to true no output is generated for the content of the current cell. Without this option
9 10 11 |
# File 'app/presenters/has_helpers/resource/cell_presenter.rb', line 9 def is_primary @is_primary end |
#is_service_external ⇒ Object
When set to true no output is generated for the content of the current cell. Without this option
9 10 11 |
# File 'app/presenters/has_helpers/resource/cell_presenter.rb', line 9 def is_service_external @is_service_external end |
#is_text ⇒ Object
When set to true no output is generated for the content of the current cell. Without this option
9 10 11 |
# File 'app/presenters/has_helpers/resource/cell_presenter.rb', line 9 def is_text @is_text end |
#primary_title ⇒ Object
When set to true no output is generated for the content of the current cell. Without this option
9 10 11 |
# File 'app/presenters/has_helpers/resource/cell_presenter.rb', line 9 def primary_title @primary_title end |
#resource=(value) ⇒ Object
Content attributes value, resource and tags. These attributes should be used exclusively.
5 6 7 |
# File 'app/presenters/has_helpers/resource/cell_presenter.rb', line 5 def resource=(value) @resource = value end |
#service ⇒ Object
When set to true no output is generated for the content of the current cell. Without this option
9 10 11 |
# File 'app/presenters/has_helpers/resource/cell_presenter.rb', line 9 def service @service end |
#service_title ⇒ Object
When set to true no output is generated for the content of the current cell. Without this option
9 10 11 |
# File 'app/presenters/has_helpers/resource/cell_presenter.rb', line 9 def service_title @service_title end |
#tags ⇒ Object
tags will generate an unordered list using the collection it is set to.
7 8 9 |
# File 'app/presenters/has_helpers/resource/cell_presenter.rb', line 7 def @tags end |
#template ⇒ Object
32 33 34 |
# File 'app/presenters/has_helpers/resource/cell_presenter.rb', line 32 def template @template.nil? ? detect_template_from_value : @template end |
#value=(value) ⇒ Object (writeonly)
Content attributes value, resource and tags. These attributes should be used exclusively.
5 6 7 |
# File 'app/presenters/has_helpers/resource/cell_presenter.rb', line 5 def value=(value) @value = value end |
#warning ⇒ Object
When set to true no output is generated for the content of the current cell. Without this option
9 10 11 |
# File 'app/presenters/has_helpers/resource/cell_presenter.rb', line 9 def warning @warning end |
Instance Method Details
#content ⇒ Object
Returns the content from either value or resource.
24 25 26 27 28 29 30 |
# File 'app/presenters/has_helpers/resource/cell_presenter.rb', line 24 def content if @value.nil? resource elsif @value.present? @value end end |