Sha256: c68738c6598dff4a5d5db1210c0e42f8618096a5e2de72a88daa8f25b92f8de7

Contents?: true

Size: 947 Bytes

Versions: 17

Compression:

Stored size: 947 Bytes

Contents

require 'rabbit/element/text-block-element'

module Rabbit
  module Element
    class Container
      include ContainerElement
      include BlockElement
    end

    class BlockQuote
      include ContainerElement
      include BlockElement
      include BlockHorizontalCentering

      attr_reader :cite, :title

      def initialize(elems=[], prop={})
        super(elems)
        %w(cite title).each do |name|
          instance_variable_set("@#{name}", prop[name])
        end
      end

      def to_html(generator)
        "<blockquote>#{super}</blockquote>"
      end
    end

    class Paragraph
      include TextBlockElement

      def text
        "#{super}\n"
      end

      def to_rd
        text
      end

      def to_html(generator)
        "<p>\n#{super}\n</p>"
      end
    end

    class WaitBlock
      include ContainerElement
      include BlockElement

      def have_wait_tag?
        true
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
rabbit-2.0.2 lib/rabbit/element/block.rb
rabbit-2.0.1 lib/rabbit/element/block.rb
rabbit-2.0.0 lib/rabbit/element/block.rb
rabbit-1.0.9 lib/rabbit/element/block.rb
rabbit-1.0.8 lib/rabbit/element/block.rb
rabbit-1.0.7 lib/rabbit/element/block.rb
rabbit-1.0.6 lib/rabbit/element/block.rb
rabbit-1.0.5 lib/rabbit/element/block.rb
rabbit-1.0.4 lib/rabbit/element/block.rb
rabbit-1.0.3 lib/rabbit/element/block.rb
rabbit-1.0.2 lib/rabbit/element/block.rb
rabbit-1.0.1 lib/rabbit/element/block.rb
rabbit-1.0.0 lib/rabbit/element/block.rb
rabbit-0.9.3 lib/rabbit/element/block.rb
rabbit-0.9.2 lib/rabbit/element/block.rb
rabbit-0.9.1 lib/rabbit/element/block.rb
rabbit-0.9.0 lib/rabbit/element/block.rb