Class: Jekyll::Assets::HTML::SVG
- Inherits:
-
Jekyll::Assets::HTML
- Object
- Extensible
- Jekyll::Assets::HTML
- Jekyll::Assets::HTML::SVG
- Defined in:
- lib/jekyll/assets/plugins/html/svg.rb
Instance Attribute Summary
Attributes inherited from Jekyll::Assets::HTML
Attributes inherited from Extensible
#args, #asset, #ctx, #env, #jekyll
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Jekyll::Assets::HTML
build, #initialize, make_doc, skips
Methods inherited from Extensible
for_args?, for_type?, inherited, #initialize, internal!, internal?, requirements
Constructor Details
This class inherits a constructor from Jekyll::Assets::HTML
Class Method Details
.for?(type:, args:) ⇒ Boolean
–
27 28 29 30 31 32 33 |
# File 'lib/jekyll/assets/plugins/html/svg.rb', line 27 def self.for?(type:, args:) return false unless super return false unless args.key?(:inline) && !args.key?(:srcset) true end |
.wants_xml? ⇒ Boolean
–
22 23 24 |
# File 'lib/jekyll/assets/plugins/html/svg.rb', line 22 def self.wants_xml? true end |
Instance Method Details
#run ⇒ Object
–
14 15 16 17 18 19 |
# File 'lib/jekyll/assets/plugins/html/svg.rb', line 14 def run arg = @args.to_h(html: true) arg.each do |k, v| @doc.set_attribute(k, v) end end |