Class: ERBLint::Linters::ArgumentMappers::IncludeFragment
- Defined in:
- lib/primer/view_components/linters/argument_mappers/include_fragment.rb
Overview
Maps attributes in the include-fragment element to arguments for the IncludeFragment component.
Constant Summary collapse
- DEFAULT_TAG =
"include-fragment"
- ATTRIBUTES =
%w[loading src accept role preload tabindex autofocus hidden].freeze
Instance Method Summary collapse
Methods inherited from Base
#classes_to_args, #initialize, #map_classes, #system_arguments_to_args, #to_args, #to_s
Constructor Details
This class inherits a constructor from ERBLint::Linters::ArgumentMappers::Base
Instance Method Details
#attribute_to_args(attribute) ⇒ Object
13 14 15 16 17 |
# File 'lib/primer/view_components/linters/argument_mappers/include_fragment.rb', line 13 def attribute_to_args(attribute) attr_name = attribute.name { attr_name.to_sym => erb_helper.convert(attribute) } end |