Sha256: 01220b2b6a7e9256be734a6bbf3d8cfcafef8d62fe331f83ba2aa544b2cf9914

Contents?: true

Size: 557 Bytes

Versions: 4

Compression:

Stored size: 557 Bytes

Contents

# frozen_string_literal: true
class Shoes
  class Text
    include Common::Inspect
    include Common::LinkFinder

    attr_reader :to_s, :texts, :color
    attr_accessor :parent, :text_block

    def initialize(texts, color = nil)
      @texts      = texts
      @color      = color
      @to_s       = @texts.map(&:to_s).join
      @parent     = nil
      @text_block = nil
    end

    def app
      parent && parent.app
    end

    def links
      find_links(@texts)
    end

    private

    def inspect_details
      " \"#{self}\""
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
shoes-core-4.0.0.pre12 lib/shoes/text.rb
shoes-core-4.0.0.pre11 lib/shoes/text.rb
shoes-core-4.0.0.pre10 lib/shoes/text.rb
shoes-core-4.0.0.pre9 lib/shoes/text.rb