Class: Wallaby::LinkOptionsNormalizer
- Inherits:
-
Object
- Object
- Wallaby::LinkOptionsNormalizer
- Defined in:
- lib/services/wallaby/link_options_normalizer.rb
Overview
Link renderer
Class Method Summary collapse
-
.normalize(html_options, block, defaults) ⇒ Array<Hash, Proc>
Normalize options for ‘link_to` to use.
Class Method Details
.normalize(html_options, block, defaults) ⇒ Array<Hash, Proc>
Normalize options for ‘link_to` to use
11 12 13 14 15 16 17 18 |
# File 'lib/services/wallaby/link_options_normalizer.rb', line 11 def self.normalize(, block, defaults) = Utils.clone block ||= defaults[:block] [:title] ||= defaults[:block].call # allow empty class to be set [:class] = defaults[:class] if !.key?(:class) && defaults[:class] [, block] end |