Class: Hyrax::PermissionBadge
- Inherits:
-
Object
- Object
- Hyrax::PermissionBadge
- Includes:
- ActionView::Helpers::TagHelper
- Defined in:
- app/presenters/hyrax/permission_badge.rb
Instance Method Summary collapse
-
#initialize(visibility_or_document) ⇒ PermissionBadge
constructor
A new instance of PermissionBadge.
-
#render ⇒ Object
Draws a span tag with styles for a bootstrap label.
Constructor Details
#initialize(visibility_or_document) ⇒ PermissionBadge
Returns a new instance of PermissionBadge.
7 8 9 |
# File 'app/presenters/hyrax/permission_badge.rb', line 7 def initialize(visibility_or_document) self.visibility = visibility_or_document end |
Instance Method Details
#render ⇒ Object
Draws a span tag with styles for a bootstrap label
12 13 14 |
# File 'app/presenters/hyrax/permission_badge.rb', line 12 def render content_tag(:span, text, class: "label #{dom_label_class}") end |