Sha256: 1a4768ab4337cc4cc48c48bc1da21829fc86819a4cb3b3308e5adf7e074ea0af

Contents?: true

Size: 971 Bytes

Versions: 94

Compression:

Stored size: 971 Bytes

Contents

##
# A section of text that is added to the output document as-is

class RDoc::Markup::Raw

  ##
  # The component parts of the list

  attr_reader :parts

  ##
  # Creates a new Raw containing +parts+

  def initialize *parts
    @parts = []
    @parts.push(*parts)
  end

  ##
  # Appends +text+

  def << text
    @parts << text
  end

  def == other # :nodoc:
    self.class == other.class and @parts == other.parts
  end

  ##
  # Calls #accept_raw+ on +visitor+

  def accept visitor
    visitor.accept_raw self
  end

  ##
  # Appends +other+'s parts

  def merge other
    @parts.push(*other.parts)
  end

  def pretty_print q # :nodoc:
    self.class.name =~ /.*::(\w{1,4})$/i

    q.group 2, "[#{$1.downcase}: ", ']' do
      q.seplist @parts do |part|
        q.pp part
      end
    end
  end

  ##
  # Appends +texts+ onto this Paragraph

  def push *texts
    self.parts.push(*texts)
  end

  ##
  # The raw text

  def text
    @parts.join ' '
  end

end

Version data entries

94 entries across 74 versions & 20 rubygems

Version Path
initforthe-cookies-0.0.1 vendor/bundle/gems/rdoc-3.12/lib/rdoc/markup/raw.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/rdoc-3.12/lib/rdoc/markup/raw.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/rdoc-3.12/lib/rdoc/markup/raw.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/rdoc-3.12/lib/rdoc/markup/raw.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/rdoc-3.12/lib/rdoc/markup/raw.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/rdoc-3.12/lib/rdoc/markup/raw.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/rdoc-3.12/lib/rdoc/markup/raw.rb
rails-uploader-0.0.4 vendor/bundle/ruby/1.9.1/gems/rdoc-3.12/lib/rdoc/markup/raw.rb
challah-0.6.1 vendor/bundle/gems/rdoc-3.12/lib/rdoc/markup/raw.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/rdoc-3.12/lib/rdoc/markup/raw.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/rdoc-3.12/lib/rdoc/markup/raw.rb
rails-uploader-0.0.1 vendor/bundle/ruby/1.9.1/gems/rdoc-3.12/lib/rdoc/markup/raw.rb
ftl-0.2.0 vendor/bundle/gems/rdoc-3.12/lib/rdoc/markup/raw.rb
challah-0.6.0 vendor/bundle/gems/rdoc-3.12/lib/rdoc/markup/raw.rb
horseman-0.0.5 vendor/ruby/1.9.1/gems/rdoc-3.12/lib/rdoc/markup/raw.rb
challah-0.5.4 vendor/bundle/gems/rdoc-3.12/lib/rdoc/markup/raw.rb
challah-0.5.3 vendor/bundle/gems/rdoc-3.12/lib/rdoc/markup/raw.rb
challah-0.5.2 vendor/bundle/gems/rdoc-3.12/lib/rdoc/markup/raw.rb
challah-0.5.1 vendor/bundle/gems/rdoc-3.12/lib/rdoc/markup/raw.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/rdoc-3.12/lib/rdoc/markup/raw.rb