module Aws::Templates::Help::Rdoc::Texting

Rdoc classes wrapper

Creates simple DSL over Rdoc native classes so text blocks can be composed in idiomatic Ruby way.

Public Instance Methods

document(*parts) { |doc| ... } click to toggle source
# File lib/aws/templates/help/rdoc/texting.rb, line 33
def document(*parts)
  doc = ::RDoc::Markup::Document.new(*parts)
  yield doc if block_given?
  doc
end
list(type = :BULLET, *parts) { |list| ... } click to toggle source
# File lib/aws/templates/help/rdoc/texting.rb, line 23
def list(type = :BULLET, *parts)
  list = ::RDoc::Markup::List.new(type, *parts)
  yield list if block_given?
  list
end
parsed_for(str) click to toggle source
# File lib/aws/templates/help/rdoc/texting.rb, line 29
def parsed_for(str)
  sub { |s| RDoc::Markup.parse(str).each { |part| s << part } }
end
sub(*parts) { |item| ... } click to toggle source
# File lib/aws/templates/help/rdoc/texting.rb, line 13
def sub(*parts)
  item = ::RDoc::Markup::ListItem.new(nil, *parts)
  yield item if block_given?
  item
end
text(str) click to toggle source
# File lib/aws/templates/help/rdoc/texting.rb, line 19
def text(str)
  ::RDoc::Markup::Paragraph.new(str)
end