Class: PictureTag::Instructions::HTMLAttributeSet

Inherits:
Object
  • Object
show all
Defined in:
lib/jekyll_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

Constructor Details

#initialize(params) ⇒ HTMLAttributeSet

Initialize with leftovers passed into the liquid tag



8
9
10
11
12
13
# File 'lib/jekyll_picture_tag/instructions/html_attributes.rb', line 8

def initialize(params)
  @content = load_preset

  parse_params(params) if params
  handle_source_url
end

Instance Method Details

#[](key) ⇒ Object



15
16
17
# File 'lib/jekyll_picture_tag/instructions/html_attributes.rb', line 15

def [](key)
  @content[key]
end