Sha256: fba53d612c8c6307d0456407f44038298855d757b036b476cfc5bed97a413d61

Contents?: true

Size: 832 Bytes

Versions: 2

Compression:

Stored size: 832 Bytes

Contents

# encoding: utf-8

module Infoboxer
  module Tree
    # Represents italic text.
    class Italic < Compound
    end

    # Represents bold text.
    class Bold < Compound
    end

    # Represents bold italic text (and no, it's not a comb of bold+italic,
    # from Wikipedia's markup point of view).
    class BoldItalic < Compound
    end

    # Base class for internal/external links,
    class Link < Compound
      def initialize(link, label = nil)
        super(label || Nodes.new([Text.new(link)]), link: link)
      end

      # @!attribute [r] link

      def_readers :link
    end

    # External link. Has other nodes as a contents, and, err, link (url).
    class ExternalLink < Link
      # @!attribute [r] url
      #   synonym for `#link`
      alias_method :url, :link
    end
  end
end

require_relative 'wikilink'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
infoboxer-0.3.0 lib/infoboxer/tree/inline.rb
infoboxer-0.2.8 lib/infoboxer/tree/inline.rb