Class: ERBLint::Linters::ArgumentMappers::ClipboardCopy
- Defined in:
- lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb
Overview
Maps attributes in the clipboard-copy element to arguments for the ClipboardCopy component.
Constant Summary collapse
- DEFAULT_TAG =
"clipboard-copy"
- ATTRIBUTES =
%w[role tabindex for value id style].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/clipboard_copy.rb', line 13 def attribute_to_args(attribute) attr_name = attribute.name { attr_name.to_sym => erb_helper.convert(attribute) } end |