Extra files to add to RDoc
such as README or doc/examples.txt
When the user elects to generate the RDoc
documentation for a gem (typically at install time), all the library files are sent to RDoc
for processing. This option allows you to have some non-code files included for a more complete set of documentation.
Usage:
spec.extra_rdoc_files = ['README', 'doc/user-guide.txt']
Return the latest installed spec for gem name
.
Sets extra_rdoc_files
to files
, ensuring it is an array.
Choose from a list of options. question
is a prompt displayed above the list. list
is a list of option strings. Returns the pair [option_name, option_index].
Join lines with a trailing slash
source = <<~'EOM' it "code can be split" \ "across multiple lines" do EOM lines = CleanDocument.new(source: source).join_consecutive!.lines expect(lines[0].to_s).to eq(source) expect(lines[1].to_s).to eq("")
Performance optimization
Parsing with ripper is expensive If we know we don’t have any blocks with invalid syntax, then we know we cannot have found the incorrect syntax yet.
When an invalid block is added onto the frontier check document state
Keeps track of what lines have been added to blocks and which are not yet visited.
When one element fully encapsulates another we remove the smaller block from the frontier. This prevents double expansions and all-around weird behavior. However this guarantee is quite expensive to maintain
Returns the destination encoding name as a string.
Returns the destination encoding name as a string.
Writes a number of random generated bytes (currently 1024) to filename which can be used to initialize the PRNG by calling ::load_random_file
in a later session.
Creates an RubyGems API to host
and path
with the given HTTP method
.
If allowed_push_host
metadata is present, then it will only allow that host.
Retrieves the pre-configured API key key
or terminates interaction with an error.