Class: BridgetownInlineSvg::Tag
- Inherits:
-
Bridgetown::Builder
- Object
- Bridgetown::Builder
- BridgetownInlineSvg::Tag
- Defined in:
- lib/bridgetown-inline-svg/tag.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#markup ⇒ Object
readonly
Returns the value of attribute markup.
-
#svg_path ⇒ Object
readonly
Returns the value of attribute svg_path.
Instance Method Summary collapse
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
3 4 5 |
# File 'lib/bridgetown-inline-svg/tag.rb', line 3 def attributes @attributes end |
#context ⇒ Object (readonly)
Returns the value of attribute context.
4 5 6 |
# File 'lib/bridgetown-inline-svg/tag.rb', line 4 def context @context end |
#markup ⇒ Object (readonly)
Returns the value of attribute markup.
5 6 7 |
# File 'lib/bridgetown-inline-svg/tag.rb', line 5 def markup @markup end |
#svg_path ⇒ Object (readonly)
Returns the value of attribute svg_path.
6 7 8 |
# File 'lib/bridgetown-inline-svg/tag.rb', line 6 def svg_path @svg_path end |
Instance Method Details
#build ⇒ Object
8 9 10 |
# File 'lib/bridgetown-inline-svg/tag.rb', line 8 def build liquid_tag "svg", :render end |
#render(markup, builder) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/bridgetown-inline-svg/tag.rb', line 12 def render(markup, builder) @context = builder.context @markup = markup interpolate_variables_in_markup! set_svg_path_and_attributes! return unless svg_path add_file_to_dependency! render_svg end |