Sha256: daefb687c58a37bc973134d6513f9864959ed2ea7e5103a92d0aa8756b470566

Contents?: true

Size: 732 Bytes

Versions: 3

Compression:

Stored size: 732 Bytes

Contents

# frozen_string_literal: true

require_relative '../span'

module Polites
  class Span::Image < Span
    attr_reader :children, :image, :filename, :title, :description, :width, :height

    def initialize(children, image:, filename: nil, title: nil, description: nil, width: nil, height: nil)
      super(children)
      @image = image
      @filename = filename
      @title = title
      @description = description
      @width = width
      @height = height
    end

    def eql?(other)
      super &&
        image == other.image &&
        filename == other.filename &&
        title == other.title &&
        description == other.description &&
        width == other.width &&
        height == other.height
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
polites-0.3.0 lib/polites/span/image.rb
polites-0.2.0 lib/polites/span/image.rb
polites-0.1.0 lib/polites/span/image.rb