Class: PictureTag::Instructions::HTMLAttributeSet
- Inherits:
-
Object
- Object
- PictureTag::Instructions::HTMLAttributeSet
- Defined in:
- lib/jekyll-4-picture-tag/instructions/html_attributes.rb
Overview
Handles HTML attributes, sourced from configuration and the liquid tag, sent to various elements. Stored as a hash, with string keys.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(params) ⇒ HTMLAttributeSet
constructor
Initialize with leftovers passed into the liquid tag.
Constructor Details
#initialize(params) ⇒ HTMLAttributeSet
Initialize with leftovers passed into the liquid tag
8 9 10 11 12 13 |
# File 'lib/jekyll-4-picture-tag/instructions/html_attributes.rb', line 8 def initialize(params) @content = load_preset parse_params(params) if params handle_url end |
Instance Method Details
#[](key) ⇒ Object
15 16 17 |
# File 'lib/jekyll-4-picture-tag/instructions/html_attributes.rb', line 15 def [](key) @content[key] end |