Sha256: b84e819303ac10a8ea07e33756405e7ad528f309fdf4e455889ddc8821fbec3d

Contents?: true

Size: 326 Bytes

Versions: 1

Compression:

Stored size: 326 Bytes

Contents

# frozen_string_literal: true

class Shoes
  class Span < Text
    def initialize(texts, styles = {})
      @style = styles
      super texts, styles.delete(:color)
    end

    def style
      if @parent && @parent.respond_to?(:style)
        @parent.style.merge(@style)
      else
        @style
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoes-core-4.0.0.rc1 lib/shoes/span.rb