Class: Maglev::Content::Text
- Defined in:
- app/components/maglev/content/text.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#tag(view_context, options = {}) ⇒ Object
rubocop:disable Rails/OutputSafety.
Methods inherited from Base
#asset_host, #dom_data, #initialize, #tag_data, #tag_id, #to_s
Constructor Details
This class inherits a constructor from Maglev::Content::Base
Instance Method Details
#tag(view_context, options = {}) ⇒ Object
rubocop:disable Rails/OutputSafety
7 8 9 10 11 12 13 14 15 |
# File 'app/components/maglev/content/text.rb', line 7 def tag(view_context, = {}) view_context.tag.public_send( .delete(:html_tag)&.to_sym || tag_name, to_s.html_safe, **{ data: (.delete(:data) || {}).merge(tag_data) }.merge() ) end |