Module: Katalyst::HtmlAttributes
- Extended by:
- ActiveSupport::Autoload, ActiveSupport::Concern
- Defined in:
- lib/katalyst/html_attributes.rb,
lib/katalyst/html_attributes/has_html_attributes.rb
Defined Under Namespace
Modules: HasHtmlAttributes
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.options_to_html_attributes(options) ⇒ Object
46
47
48
|
# File 'lib/katalyst/html_attributes.rb', line 46
def options_to_html_attributes(options)
options.slice(:id, :aria, :class, :data).merge_html(options.fetch(:html, {}))
end
|
Instance Method Details
#initialize(**options) ⇒ Object
40
41
42
43
44
|
# File 'lib/katalyst/html_attributes.rb', line 40
def initialize(**options)
super(**options.except(:id, :aria, :class, :data, :html))
self.html_attributes = options
end
|