Sha256: ba8b0394584307b444b40c84b841380afb4c0ab484566b8e6a4372b19732657a

Contents?: true

Size: 322 Bytes

Versions: 3

Compression:

Stored size: 322 Bytes

Contents

# frozen_string_literal: true

module Exclaim
  module Implementations
    IMAGE_COMPONENT = ->(config, _env) do
      source = config['source'] || config['$image']
      alt = config['alt']
      "<img src=\"#{source}\" alt=\"#{alt}\">"
    end
    IMAGE_COMPONENT.define_singleton_method(:component?) { true }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby-exclaim-0.1.1 lib/exclaim/implementations/image_component.rb
ruby-exclaim-0.1.0 lib/exclaim/implementations/image_component.rb
ruby-exclaim-0.0.0 lib/exclaim/implementations/image_component.rb