query
stringlengths
7
9.55k
document
stringlengths
10
363k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Adds footnote +content+ to the document
def add_footnote content index = @footnotes.length / 2 + 1 footmark_link = "{^#{index}}[rdoc-label:footmark-#{index}:foottext-#{index}]" @footnotes << RDoc::Markup::Paragraph.new(footmark_link, ' ', *content) @footnotes << RDoc::Markup::BlankLine.new index end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def footnote_content; end", "def footnote_content\n ol = Element.new(:ol)\n ol.attr['start'] = @footnote_start if @footnote_start != 1\n i = 0\n while i < @footnotes.length\n name, data, _, repeat = *@footnotes[i]\n li = Element.new(:li, nil, {'id' => \"fn-#{name}\"}...
[ "0.7353343", "0.67127365", "0.6402522", "0.6190213", "0.6165799", "0.6163806", "0.6143311", "0.6040466", "0.6037798", "0.6009692", "0.59959054", "0.5912585", "0.59065425", "0.58335537", "0.58293486", "0.5793374", "0.57779896", "0.5775368", "0.5756174", "0.5751067", "0.5727553...
0.8181595
0
Adds label +label+ to the document
def add_label label @labels[label] = true label end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_label(label)\n d = [label, AS::LabelObject.new]\n @table << d\n d[1]\n end", "def add_label(label)\n @api.do_request(\"PUT\", label.get_base_api_path() + \"/messages/\" + get('id'));\n @label_ids_set[label.id] = true\n end", "def add_label(label)\n @api.do_request(\"PU...
[ "0.77161074", "0.7364976", "0.7364976", "0.7288029", "0.72297037", "0.7170664", "0.7166082", "0.7158131", "0.71087605", "0.7017716", "0.6903014", "0.6881589", "0.6880576", "0.68630475", "0.68630475", "0.679436", "0.67817885", "0.6775039", "0.676445", "0.6760925", "0.67089933"...
0.75678223
1
State transition tables end reduce 0 omitted
def _reduce_1(val, _values, result) result = RDoc::Markup::Document.new(*val[0]) result end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def transitions; end", "def closure! \n cstart = new_state\n cend = new_state\n\n add_transition(cstart, cend, \"\")\n add_transition(cend, cstart, \"\")\n\n add_transition(cstart, @start, \"\")\n @final.keys.each { |key| add_transition(key, cend, \"\")}\n\n set_start(cstart)\n...
[ "0.64042956", "0.6064393", "0.60386634", "0.6007729", "0.5946686", "0.59351325", "0.59351325", "0.5909589", "0.58873314", "0.58676314", "0.58676314", "0.57807076", "0.5779571", "0.5710219", "0.56961817", "0.5655912", "0.55736065", "0.55026084", "0.54936284", "0.5481873", "0.5...
0.0
-1
reduce 23 omitted reduce 24 omitted reduce 25 omitted reduce 26 omitted
def _reduce_27(val, _values, result) result = val[0] result end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _reduce_76(val, _values, result); end", "def _reduce_76(val, _values, result); end", "def _reduce_13(val, _values, result); end", "def _reduce_23(val, _values, result); end", "def _reduce_263(val, _values, result); end", "def _reduce_263(val, _values, result); end", "def _reduce_239(val, _values, r...
[ "0.69448376", "0.69448376", "0.6937775", "0.69177926", "0.6906505", "0.6906505", "0.68809503", "0.686238", "0.68542624", "0.68542624", "0.68502086", "0.6841802", "0.6841802", "0.68382025", "0.6836127", "0.683249", "0.683249", "0.68163353", "0.68074095", "0.68045086", "0.67902...
0.0
-1
reduce 58 omitted reduce 59 omitted reduce 60 omitted reduce 61 omitted
def _reduce_62(val, _values, result) result = paragraph [val[0]].concat(val[1]) result end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _reduce_608(val, _values, result)\n yyerrok\n \n result\nend", "def _reduce_608(val, _values, result)\n result = nil\n \n result\nend", "def _reduce_603(val, _values, result)\n result = nil\n \...
[ "0.7298689", "0.7275692", "0.72752094", "0.7230602", "0.72231406", "0.72140455", "0.7201344", "0.7185427", "0.718411", "0.718411", "0.7179438", "0.71634", "0.7158752", "0.7158752", "0.71527827", "0.71419454", "0.7140727", "0.71391606", "0.71388185", "0.7137708", "0.7118223", ...
0.0
-1
Initializes the Inline with +rdoc+ and +inline+
def initialize rdoc, reference # :not-new: @reference = reference.equal?(rdoc) ? reference.dup : reference # unpack @reference = @reference.reference if self.class === @reference @rdoc = rdoc end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize\n @inline_parser = RDoc::RD::InlineParser.new self\n @include_path = []\n\n # for testing\n @footnotes = []\n @labels = {}\nend", "def inline!\n @inline = true\n end", "def inline rdoc, reference = rdoc\n RDoc::RD::Inline.new rdoc, reference\nend", "def inline!\n self...
[ "0.78173923", "0.67956537", "0.6771381", "0.6449507", "0.58005285", "0.57799214", "0.5744518", "0.5717295", "0.5696962", "0.5695887", "0.5673814", "0.56737834", "0.56615233", "0.56409377", "0.56404096", "0.56158835", "0.55818737", "0.5550465", "0.5499463", "0.5408975", "0.539...
0.0
-1
Appends +more+ to this inline. +more+ may be a String or another Inline.
def append more case more when String then @reference += more @rdoc += more when RDoc::RD::Inline then @reference += more.reference @rdoc += more.rdoc else raise "unknown thingy #{more}" end self end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def excerpt(more_link = false)\n s = sections\n return \"\" if s.length < 1\n if s.length > 1 && more_link\n s.first << ' <a href=\"/nyheter/' + id.to_s +\n '\" class=\"read-more\">Läs&nbsp;resten&nbsp;&raquo;</a>'\n end\n s.first\n end", "def expand_more(more)\n response = cli...
[ "0.66869265", "0.6556481", "0.6383058", "0.6334413", "0.61393714", "0.6043309", "0.5722132", "0.56770945", "0.55650496", "0.55650496", "0.55563444", "0.54179686", "0.53297776", "0.5281284", "0.5273304", "0.51712686", "0.5159124", "0.51494145", "0.513824", "0.50958014", "0.507...
0.708622
0
:startdoc: Creates a new parser for inline markup in the rd format. The +block_parser+ is used to for footnotes and labels in the inline text.
def initialize block_parser @block_parser = block_parser end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse\n _build_document\n _close_open_block_commands\n @document\n end", "def parser( &block )\n nested_class( 'Parser', Yacl::Define::Cli::Parser, &block )\n end", "def initialize\n @inline_parser = RDoc::RD::InlineParser.new self\n @include_path = []\n\n # for testing\n ...
[ "0.59819454", "0.590024", "0.5756441", "0.56988955", "0.562464", "0.5599593", "0.5388", "0.5325894", "0.5290482", "0.5149187", "0.5137734", "0.5133078", "0.5131984", "0.5100302", "0.5050883", "0.502554", "0.5025179", "0.5014698", "0.49928772", "0.49890593", "0.49795812", "0...
0.55314684
6
Parses the +inline+ text from RD format into RDoc format.
def parse inline @inline = inline @src = StringScanner.new inline @pre = "".dup @yydebug = true do_parse.to_s end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def inline rdoc, reference = rdoc\n RDoc::RD::Inline.new rdoc, reference\nend", "def inline_html(text)\n # process simple inlines\n for inline in INLINES_HTML\n text.gsub!(/#{inline[0]}/m, inline[1]) if text.match(/#{inline[0]}/m)\n end\n # process link inlines\n if t...
[ "0.6351248", "0.62311816", "0.61664766", "0.60693556", "0.5751253", "0.56773114", "0.5670144", "0.56551546", "0.5654252", "0.5639301", "0.5611806", "0.55542856", "0.551609", "0.54917026", "0.5482428", "0.5480431", "0.54736006", "0.544003", "0.5289967", "0.52795917", "0.524296...
0.59198624
4
Returns the next token from the inline text
def next_token return [false, false] if @src.eos? # p @src.rest if @yydebug if ret = @src.scan(EM_OPEN_RE) @pre << ret [:EM_OPEN, ret] elsif ret = @src.scan(EM_CLOSE_RE) @pre << ret [:EM_CLOSE, ret] elsif ret = @src.scan(CODE_OPEN_RE) @pre << ret [:CODE_OPEN, ret] elsif ret = @src.sca...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def next_token; end", "def next_token\n tokens.shift\n end", "def next_token\n @tokens.shift\n end", "def next\n token = next_token\n token = next_token while token&.empty?\n token\n end", "def next\n\t\tif @next_token\n\t\t\ttoken = @next_token\n\t\t\t@next_token = nil\n\t\t\tret...
[ "0.72524875", "0.7230801", "0.7200676", "0.7059817", "0.7056992", "0.704796", "0.6894967", "0.68718684", "0.6717207", "0.6614445", "0.654802", "0.65432113", "0.65155864", "0.6483326", "0.6479648", "0.647486", "0.64388096", "0.6413368", "0.6383299", "0.6371114", "0.6328418", ...
0.0
-1
Returns words before the error
def prev_words_on_error(ev) pre = @pre if ev and /#{Regexp.quote(ev)}$/ =~ pre pre = $` end last_line(pre) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def filter_low_priority_errors(errors)\n list = errors.split(\"\\n\")\n list.reject! do |line|\n line.include?(\"is not approved by W3C\") ||\n line.include?('proprietary attribute \"ng-') || # AngularJS custom attributes\n line.include?(\"inserting implicit <body>\") ||\n line =~ /trimmi...
[ "0.6348735", "0.6220793", "0.6030838", "0.59069765", "0.58801705", "0.58279526", "0.57888263", "0.57522607", "0.5694544", "0.56535524", "0.56502885", "0.564973", "0.564973", "0.564973", "0.564973", "0.5616739", "0.5589839", "0.55814564", "0.55568355", "0.5532333", "0.55268145...
0.687172
0
Returns the last line of +src+
def last_line(src) if n = src.rindex("\n") src[(n+1) .. -1] else src end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def last_line; end", "def last_line; end", "def last_line; end", "def last_line; end", "def last_line; end", "def last_line; end", "def last_line; end", "def last_instant_text\n return @lines[-1]\n end", "def last_line_only(range); end", "def last_line_only(range); end", "def last_line_only...
[ "0.7474069", "0.7474069", "0.7474069", "0.7474069", "0.7474069", "0.7474069", "0.7474069", "0.674055", "0.6607243", "0.6607243", "0.6607243", "0.65279114", "0.65078044", "0.63921005", "0.63893586", "0.6280217", "0.62759405", "0.62654895", "0.6244092", "0.61773837", "0.6159382...
0.8827477
0
Returns words following an error
def next_words_on_error if n = @src.rest.index("\n") @src.rest[0 .. (n-1)] else @src.rest end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def prev_words_on_error(ev)\n pre = @pre\n if ev and /#{Regexp.quote(ev)}$/ =~ pre\n pre = $`\n end\n last_line(pre)\nend", "def error_chunks(text) \n text.split(/^$/).select(){ |block| block =~ /^(\\d+)\\t([^\\t]+)\\t([^\\t]+)\\t(.+)$/ }\nend", "def feedback\n puts \"Spelling errors\"\n #Default err...
[ "0.6814548", "0.6106671", "0.60638165", "0.60571945", "0.5965087", "0.5920879", "0.5879504", "0.58726233", "0.5868595", "0.58626974", "0.58604634", "0.5784558", "0.57303804", "0.5710752", "0.5702268", "0.56809974", "0.56602234", "0.5492801", "0.5488391", "0.54824543", "0.5441...
0.6299035
1
Creates a new RDoc::RD::Inline for the +rdoc+ markup and the raw +reference+
def inline rdoc, reference = rdoc RDoc::RD::Inline.new rdoc, reference end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize\n @inline_parser = RDoc::RD::InlineParser.new self\n @include_path = []\n\n # for testing\n @footnotes = []\n @labels = {}\nend", "def html_markup_rdoc(text); end", "def formatter(io)\n RDoc::Markup::ToRdoc.new\n end", "def formatter\n return @formatter if defined? @formatter\n\...
[ "0.63603777", "0.6066178", "0.58694226", "0.5812683", "0.57891375", "0.5753467", "0.56873125", "0.56098086", "0.5573608", "0.55685943", "0.5557796", "0.54745245", "0.54745245", "0.54736996", "0.5439813", "0.53755444", "0.5371821", "0.5346197", "0.5331305", "0.532606", "0.5321...
0.8262444
0
State transition tables end reduce 0 omitted reduce 1 omitted
def _reduce_2(val, _values, result) result.append val[1] result end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compute_unreachable_states\n queue = [starting_state].to_set\n transitions = self.each_transition.to_a.dup\n\n done_something = true\n while done_something\n done_something = false\n transi...
[ "0.61532664", "0.61157733", "0.6079665", "0.59659433", "0.58787626", "0.58256954", "0.56528294", "0.56514734", "0.5647997", "0.5644975", "0.5626823", "0.562325", "0.56059897", "0.5522287", "0.5508329", "0.54583", "0.54407173", "0.54306906", "0.5401888", "0.540162", "0.5394439...
0.0
-1
reduce 4 omitted reduce 5 omitted reduce 6 omitted reduce 7 omitted reduce 8 omitted reduce 9 omitted reduce 10 omitted reduce 11 omitted reduce 12 omitted
def _reduce_13(val, _values, result) content = val[1] result = inline "<em>#{content}</em>", content result end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _reduce_13(val, _values, result); end", "def _reduce_612(val, _values, result)\n result = nil\n \n result\nend", "def _reduce_576(val, _values, result)\n _, margs, _ = val\n\n result = margs\n\n result\nend", "def _reduce...
[ "0.7018995", "0.6976557", "0.69617134", "0.69617134", "0.696003", "0.696003", "0.693543", "0.6924724", "0.6917128", "0.68900704", "0.6888216", "0.68851286", "0.6876592", "0.68617904", "0.6861284", "0.68605393", "0.68591255", "0.68591255", "0.6859022", "0.68541896", "0.6847675...
0.0
-1
reduce 47 omitted reduce 48 omitted reduce 49 omitted reduce 50 omitted reduce 51 omitted reduce 52 omitted reduce 53 omitted reduce 54 omitted reduce 55 omitted reduce 56 omitted
def _reduce_57(val, _values, result) result = val[0] result end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _reduce_496(val, _values, result)\n result = nil\n \n result\nend", "def _reduce_608(val, _values, result)\n result = nil\n \n result\nend", "def _reduce_527(val, _values, result)\n result = nil\n ...
[ "0.71553904", "0.7135956", "0.70943373", "0.7092021", "0.7075525", "0.7074521", "0.70677155", "0.70584375", "0.70584375", "0.70418054", "0.7041187", "0.7041187", "0.7033693", "0.7033693", "0.70170355", "0.7016163", "0.70159197", "0.70122015", "0.7004466", "0.7004466", "0.6998...
0.0
-1
reduce 65 omitted reduce 66 omitted reduce 67 omitted reduce 68 omitted reduce 69 omitted reduce 70 omitted reduce 71 omitted reduce 72 omitted reduce 73 omitted reduce 74 omitted reduce 75 omitted reduce 76 omitted reduce 77 omitted
def _reduce_78(val, _values, result) result << val[1] result end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _reduce_608(val, _values, result)\n result = nil\n \n result\nend", "def _reduce_496(val, _values, result)\n result = nil\n \n result\nend", "def _reduce_712(val, _values, result)\n result = nil\n ...
[ "0.6755437", "0.6712075", "0.66710544", "0.66356623", "0.6633398", "0.6620393", "0.6613991", "0.6601779", "0.66001564", "0.6592906", "0.6592906", "0.6592543", "0.6592543", "0.6586487", "0.6573726", "0.65624076", "0.6557564", "0.6553798", "0.654409", "0.654409", "0.6538472", ...
0.0
-1
reduce 79 omitted reduce 80 omitted reduce 81 omitted reduce 82 omitted reduce 83 omitted reduce 84 omitted reduce 85 omitted reduce 86 omitted reduce 87 omitted reduce 88 omitted reduce 89 omitted reduce 90 omitted reduce 91 omitted reduce 92 omitted reduce 93 omitted reduce 94 omitted reduce 95 omitted reduce 96 omit...
def _reduce_101(val, _values, result) index = @block_parser.add_footnote val[1].rdoc result = "{*#{index}}[rdoc-label:foottext-#{index}:footmark-#{index}]" result end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _reduce_498(val, _values, result)\n result = nil\n\n result\nend", "def _reduce_496(val, _values, result)\n result = nil\n \n result\nend", "def _reduce_596(val, _values, result)\n yyerrok\n \n result\...
[ "0.6622757", "0.65963644", "0.65619797", "0.6535902", "0.6513999", "0.64953786", "0.64950186", "0.64911467", "0.6484419", "0.647781", "0.6447387", "0.6444558", "0.6438601", "0.6435214", "0.6435214", "0.643299", "0.6414439", "0.64130014", "0.6407635", "0.6407278", "0.6402022",...
0.0
-1
reduce 103 omitted reduce 104 omitted reduce 105 omitted reduce 106 omitted reduce 107 omitted reduce 108 omitted
def _reduce_109(val, _values, result) result << val[1] result end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _reduce_603(val, _values, result)\n result = nil\n \n result\nend", "def _reduce_608(val, _values, result)\n result = nil\n \n result\nend", "def _reduce_712(val, _values, result)\n result = nil\n ...
[ "0.73620445", "0.72980744", "0.7250272", "0.72487956", "0.72487956", "0.72349566", "0.72302634", "0.72129846", "0.7209285", "0.7202904", "0.719673", "0.719673", "0.7191566", "0.71914905", "0.7161178", "0.7161178", "0.715641", "0.7154272", "0.7148848", "0.71472454", "0.7128953...
0.0
-1
reduce 116 omitted reduce 117 omitted reduce 118 omitted reduce 119 omitted reduce 120 omitted reduce 121 omitted reduce 122 omitted reduce 123 omitted reduce 124 omitted reduce 125 omitted reduce 126 omitted reduce 127 omitted reduce 128 omitted reduce 129 omitted reduce 130 omitted reduce 131 omitted reduce 132 omitt...
def _reduce_136(val, _values, result) result << val[1] result end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _reduce_608(val, _values, result)\n yyerrok\n \n result\nend", "def _reduce_608(val, _values, result)\n result = nil\n \n result\nend", "def _reduce_596(val, _values, result)\n yyerrok\n \n ...
[ "0.69828695", "0.6975319", "0.6959448", "0.69570005", "0.6917766", "0.6917766", "0.6884534", "0.68824446", "0.6879268", "0.68749577", "0.68749577", "0.68696827", "0.6867893", "0.68666595", "0.6864976", "0.6864614", "0.68617725", "0.68601906", "0.68513846", "0.68478084", "0.68...
0.0
-1
Creates a new documentation generator for +spec+. RDoc and ri data generation can be enabled or disabled through +generate_rdoc+ and +generate_ri+ respectively. Only +generate_ri+ is enabled by default.
def initialize spec, generate_rdoc = false, generate_ri = true @doc_dir = spec.doc_dir @force = false @rdoc = nil @spec = spec @generate_rdoc = generate_rdoc @generate_ri = generate_ri @rdoc_dir = spec.doc_dir 'rdoc' @ri_dir = spec.doc_dir 'ri' end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generate\n return if @spec.default_gem?\n return unless @generate_ri or @generate_rdoc\n\n setup\n\n options = nil\n\n args = @spec.rdoc_options\n args.concat @spec.source_paths\n args.concat @spec.extra_rdoc_files\n\n case config_args = Gem.configuration[:rdoc]\n when String then\n ...
[ "0.7817293", "0.7638389", "0.6737299", "0.66253453", "0.65884686", "0.6533623", "0.6456112", "0.6454725", "0.64295906", "0.63901675", "0.63633573", "0.62931275", "0.6025855", "0.59228957", "0.5900861", "0.5876097", "0.58476084", "0.5812218", "0.5788851", "0.5695248", "0.56241...
0.6596856
4
Removes legacy rdoc arguments from +args+ TODO move to RDoc::Options
def delete_legacy_args args args.delete '--inline-source' args.delete '--promiscuous' args.delete '-p' args.delete '--one-file' end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def process_r2doc_args(args, overrides)\n processed = []\n local_options = {}\n \n # add the overrides first\n overrides.each do |o|\n processed.push \"--#{o[0]}\"\n processed.push o[2]\n end\n \n while args.length > 0 do\n thisOpt = args.shift\n thisParam = nil\n if thisOpt =~ /^-/\n #...
[ "0.68403304", "0.6211101", "0.6093387", "0.6035532", "0.5854242", "0.5845238", "0.5832925", "0.57862806", "0.5696348", "0.5685557", "0.56854695", "0.5660006", "0.5660006", "0.56099004", "0.55897117", "0.55897117", "0.55897117", "0.55683625", "0.55641365", "0.55436844", "0.554...
0.68112034
2
Generates documentation using the named +generator+ ("darkfish" or "ri") and following the given +options+. Documentation will be generated into +destination+
def document generator, options, destination generator_name = generator options = options.dup options.exclude ||= [] # TODO maybe move to RDoc::Options#finish options.setup_generator generator options.op_dir = destination Dir.chdir @spec.full_gem_path do options.finish end genera...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def document generator, options, destination\n generator_name = generator\n\n options = options.dup\n options.exclude ||= [] # TODO maybe move to RDoc::Options#finish\n options.setup_generator generator\n options.op_dir = destination\n options.finish\n\n generator = options.generator.new @rdoc...
[ "0.76753575", "0.6523433", "0.63142574", "0.6225965", "0.6158748", "0.6116157", "0.59522223", "0.58921546", "0.58335125", "0.5789101", "0.5654728", "0.5590948", "0.55877876", "0.55546683", "0.5548334", "0.55297977", "0.55281365", "0.5505111", "0.5483584", "0.5477118", "0.5467...
0.75904226
1
Generates RDoc and ri data
def generate return if @spec.default_gem? return unless @generate_ri or @generate_rdoc setup options = nil args = @spec.rdoc_options args.concat @spec.source_paths args.concat @spec.extra_rdoc_files case config_args = Gem.configuration[:rdoc] when String then args = args.co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generate_doc\n\n end", "def generate_ri\n setup_rdoc\n install_ri # RDoc bug, ri goes first\n\n FileUtils.mkdir_p @doc_dir unless File.exist?(@doc_dir)\n end", "def generateRDoc\r\n rSuccess = true\r\n\r\n logOp('Generating RDoc') do\r\n # This was used by modifications to...
[ "0.74912596", "0.72874266", "0.7245082", "0.7212774", "0.67115545", "0.6614094", "0.65500164", "0.6532838", "0.65212053", "0.641986", "0.6407197", "0.62957066", "0.6272976", "0.6266519", "0.62645626", "0.6237979", "0.618664", "0.61591965", "0.61591965", "0.61591965", "0.61591...
0.69598526
4
new_rdoc creates a new RDoc instance. This method is provided only to make testing easier.
def new_rdoc # :nodoc: ::RDoc::RDoc.new end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generate\n return unless @generate_ri or @generate_rdoc\n\n setup\n\n options = nil\n\n if Gem::Requirement.new('< 3').satisfied_by? self.class.rdoc_version then\n generate_legacy\n return\n end\n\n ::RDoc::TopLevel.reset # TODO ::RDoc::RDoc.reset\n ::RDoc::Parser::C.reset\n\n ...
[ "0.6530328", "0.6441932", "0.64201313", "0.62801695", "0.6117729", "0.61174315", "0.5904519", "0.5739521", "0.5727073", "0.57164633", "0.5715358", "0.5663879", "0.56521755", "0.5647812", "0.5628845", "0.5626926", "0.55863106", "0.5573533", "0.5570123", "0.5535541", "0.5513267...
0.8525343
1
Is rdoc documentation installed?
def rdoc_installed? File.exist? @rdoc_dir end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rdoc_installed?\n File.exist?(File.join(@doc_dir, \"rdoc\"))\n end", "def ri_installed?\n File.exist?(File.join(@doc_dir, \"ri\"))\n end", "def has_rdoc # :nodoc:\n true\n end", "def has_doc?\n File.exist?(doc_path)\n end", "def has_doc?\n !docstring.all.empty?\n end...
[ "0.8728734", "0.7489716", "0.7453222", "0.7385943", "0.73391765", "0.6946819", "0.69182634", "0.67972654", "0.6766939", "0.67031765", "0.665058", "0.66384846", "0.66384846", "0.65268636", "0.6519164", "0.64991105", "0.64814067", "0.6461908", "0.64602053", "0.63807297", "0.636...
0.86864954
2
Removes generated RDoc and ri data
def remove base_dir = @spec.base_dir raise Gem::FilePermissionError, base_dir unless File.writable? base_dir FileUtils.rm_rf @rdoc_dir FileUtils.rm_rf @ri_dir end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_files_we_dont_need\n say 'Remove files we don\\'t need'\n build :remove_public_index\n build :remove_readme_rdoc\n end", "def discard_doc!\n links # force parsing of page links before we trash the document\n @doc = @body = nil\n end", "def remove_private\n # Workaro...
[ "0.66040033", "0.6511061", "0.6256295", "0.6242986", "0.6175732", "0.616328", "0.60622686", "0.60288334", "0.5946954", "0.5934058", "0.59242254", "0.5899748", "0.5889761", "0.5876506", "0.5876506", "0.58351463", "0.5791596", "0.5735489", "0.5701295", "0.5628816", "0.56073844"...
0.5871435
16
Is ri data installed?
def ri_installed? File.exist? @ri_dir end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ri_installed?\n File.exist?(File.join(@doc_dir, \"ri\"))\n end", "def installed?\n false\n end", "def installed?\n File.exists?(@path)\n end", "def installed?\n !!@installed\n end", "def installed?\n ::File.exist?(PATH)\n end", "def installed?\n ...
[ "0.7728776", "0.65858364", "0.6516024", "0.64502835", "0.6446765", "0.64140075", "0.6250084", "0.6218491", "0.621811", "0.62174493", "0.6203416", "0.61872804", "0.6180513", "0.6175928", "0.61673594", "0.6153547", "0.61346906", "0.61346906", "0.6126808", "0.6105065", "0.610153...
0.8108304
1
Prepares the spec for documentation generation
def setup self.class.load_rdoc raise Gem::FilePermissionError, @doc_dir if File.exist?(@doc_dir) and not File.writable?(@doc_dir) FileUtils.mkdir_p @doc_dir unless File.exist? @doc_dir end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize spec, generate_rdoc = true, generate_ri = true\n @doc_dir = spec.doc_dir\n @file_info = nil\n @force = false\n @rdoc = nil\n @spec = spec\n\n @generate_rdoc = generate_rdoc\n @generate_ri = generate_ri\n\n @rdoc_dir = spec.doc_dir 'rdoc'\n @ri_dir = spe...
[ "0.6393679", "0.6391304", "0.6171511", "0.5913103", "0.5902936", "0.57999855", "0.5775614", "0.5769108", "0.56938136", "0.56752974", "0.5670064", "0.5633357", "0.5613417", "0.5587007", "0.5587007", "0.55812424", "0.5577707", "0.55737877", "0.5529458", "0.55286974", "0.5528618...
0.5478605
23
Creates an unnamed empty context with public current visibility
def initialize super @in_files = [] @name ||= "unknown" @parent = nil @visibility = :public @current_section = Section.new self, nil, nil @sections = { nil => @current_section } @temporary_section = nil @classes = {} @modules = {} initialize_methods_etc end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize\n self.context = Context.new\n end", "def context\n {}\n end", "def context\n {}\n end", "def execution_context\n initialize_context!(Object.new)\n end", "def main_context\n @main_context ||= Context.new\n end", "def create_execution_context()\n ...
[ "0.6128893", "0.6107337", "0.6107337", "0.60841656", "0.6063041", "0.59699374", "0.59360117", "0.58625925", "0.5852949", "0.58314663", "0.58140534", "0.5729834", "0.57074755", "0.5685451", "0.5682983", "0.5644975", "0.5624163", "0.5596126", "0.5596126", "0.55856544", "0.55645...
0.0
-1
Sets the defaults for methods and soforth
def initialize_methods_etc @method_list = [] @attributes = [] @aliases = [] @requires = [] @includes = [] @extends = [] @constants = [] @external_aliases = [] @current_line_visibility = nil # This Hash maps a method name to a list of unmatched aliases (aliases o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_defaults\n end", "def set_defaults\n end", "def initialize_defaults(method_name)\n end", "def set_defaults\n\n end", "def set_defaults\n\n end", "def set_defaults\n\n end", "def set_defaults\n\n end", "def set_defaults\n\n end", "def set_defaults\n\n end", "def defaults; end"...
[ "0.77931607", "0.77931607", "0.7750167", "0.7738333", "0.7738333", "0.7738333", "0.7738333", "0.7738333", "0.7738333", "0.7613844", "0.7613844", "0.7613844", "0.7613844", "0.7613844", "0.7613844", "0.7613844", "0.7613844", "0.7613844", "0.7613844", "0.7536209", "0.7536209", ...
0.0
-1
Contexts are sorted by full_name
def <=>(other) return nil unless RDoc::CodeObject === other full_name <=> other.full_name end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def contexts\n map(&:contexts).flatten.uniq.sort\n end", "def sort_name\n sort_constituent\n end", "def all\n\t\tin_key_context! if key\n\t\tin_mode_context! if mode\n\t\tself.sort_by(&:position)\n\tend", "def getContexts(className)\n taggings = ActsAsTaggableOn::Tagging.where(...
[ "0.70175517", "0.59612674", "0.5957204", "0.5884082", "0.5851977", "0.5851706", "0.5620797", "0.553379", "0.55326265", "0.5522637", "0.5450769", "0.54093885", "0.5405587", "0.5390359", "0.5368401", "0.53641057", "0.5315093", "0.5298469", "0.5293905", "0.5273218", "0.52468", ...
0.0
-1
Adds an item of type +klass+ with the given +name+ and +comment+ to the context. Currently only RDoc::Extend and RDoc::Include are supported.
def add klass, name, comment if RDoc::Extend == klass then ext = RDoc::Extend.new name, comment add_extend ext elsif RDoc::Include == klass then incl = RDoc::Include.new name, comment add_include incl else raise NotImplementedError, "adding a #{klass} is not implemented" en...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_item( klass, name, action )\n fail SyntaxError, \"Undefined class #{klass} found in #{self}\" unless library_defined?(klass)\n library_handler[klass].define(name, action) \n end", "def add_comment(comment); end", "def add_comment comment\n comment = extract_comment comment\n\n return...
[ "0.60683423", "0.5961847", "0.5745345", "0.56437093", "0.5639085", "0.5639085", "0.56359994", "0.5582797", "0.5580609", "0.5435595", "0.53141254", "0.5303259", "0.5225336", "0.5180429", "0.5160369", "0.513429", "0.5127273", "0.50715816", "0.5058498", "0.50325656", "0.5019411"...
0.7621646
0
Adds +an_alias+ that is automatically resolved
def add_alias an_alias return an_alias unless @document_self method_attr = find_method(an_alias.old_name, an_alias.singleton) || find_attribute(an_alias.old_name, an_alias.singleton) if method_attr then method_attr.add_alias an_alias, self else add_to @external_aliases, a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_alias( name )\n\t\t\t@aliases << name\n\t\tend", "def add_alias(an_alias)\n meth = find_instance_method_named(an_alias.old_name)\n\n if meth then\n add_alias_impl an_alias, meth\n else\n add_to @aliases, an_alias\n unmatched_alias_list = @unmatched_alias_lists[an_alias.old_name] |...
[ "0.8168944", "0.7998894", "0.78665185", "0.78665185", "0.777355", "0.7743527", "0.7741917", "0.7731165", "0.7731165", "0.77295023", "0.77138263", "0.76267326", "0.7567151", "0.75499445", "0.75307", "0.747136", "0.7374739", "0.7360335", "0.73319536", "0.726755", "0.7243407", ...
0.77172005
10
Adds +attribute+ if not already there. If it is (as method(s) or attribute), updates the comment if it was empty. The attribute is registered only if it defines a new method. For instance, attr_reader :foo will not be registered if method +foo+ exists, but attr_accessor :foo will be registered if method +foo+ exists, b...
def add_attribute attribute return attribute unless @document_self # mainly to check for redefinition of an attribute as a method # TODO find a policy for 'attr_reader :foo' + 'def foo=()' register = false key = nil if attribute.rw.index 'R' then key = attribute.pretty_name known ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_attribute(attribute)\n @attributes << attribute\n end", "def define_attribute_method(attribute)\n type = attribute_types[attribute]\n super unless TypeMap.lookup(type, self, attribute)\n end", "def define_attribute_method(attr_name, _owner: generated_attribute...
[ "0.6560505", "0.6511282", "0.6342006", "0.61986476", "0.6088655", "0.59189224", "0.5896683", "0.58944654", "0.58803207", "0.58746785", "0.58746785", "0.58746785", "0.58743554", "0.58721614", "0.58508444", "0.58420795", "0.5790952", "0.5777793", "0.5698099", "0.56934637", "0.5...
0.77417433
0
Adds a class named +given_name+ with +superclass+. Both +given_name+ and +superclass+ may contain '::', and are interpreted relative to the +self+ context. This allows handling correctly examples like these: class RDoc::Gauntlet class Container::Item RDoc assumes +Container+ is a module unless it later sees class Conta...
def add_class class_type, given_name, superclass = '::Object' # superclass +nil+ is passed by the C parser in the following cases: # - registering Object in 1.8 (correct) # - registering BasicObject in 1.9 (correct) # - registering RubyVM in 1.9 in iseq.c (incorrect: < Object in vm.c) # # If we ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_class(name); end", "def add_class(name); end", "def add_class(class_type, name, superclass = 'Object')\n klass = add_class_or_module @classes, class_type, name, superclass\n\n # If the parser encounters Container::Item before encountering\n # Container, then it assumes that Container is a modu...
[ "0.60703313", "0.60703313", "0.60534734", "0.5979694", "0.5953592", "0.58892363", "0.5754153", "0.5754153", "0.5528582", "0.5461154", "0.53789485", "0.53466517", "0.5324937", "0.5276995", "0.51892", "0.51872617", "0.51300263", "0.5100632", "0.50995165", "0.5075842", "0.501579...
0.675426
0
Adds the class or module +mod+ to the modules or classes Hash +self_hash+, and to +all_hash+ (either TopLevel::modules_hash or TopLevel::classes_hash), unless done_documenting is +true+. Sets the parent of +mod+ to +self+, and its section to current_section. Returns +mod+.
def add_class_or_module mod, self_hash, all_hash mod.section = current_section # TODO declaring context? something is # wrong here... mod.parent = self mod.full_name = nil mod.store = @store unless @done_documenting then self_hash[mod.name] = mod # this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def merge class_module\n @parent = class_module.parent\n @parent_name = class_module.parent_name\n\n other_document = parse class_module.comment_location\n\n if other_document then\n document = parse @comment_location\n\n document = document.merge other_document\n\n @comment = @comm...
[ "0.57583505", "0.5551552", "0.53393465", "0.5178448", "0.50658095", "0.50586724", "0.49709484", "0.4612671", "0.46004993", "0.45823005", "0.45748776", "0.4481256", "0.4473188", "0.44302082", "0.44229868", "0.44113794", "0.43968853", "0.43968853", "0.43639326", "0.43372697", "...
0.76513034
0
Adds +constant+ if not already there. If it is, updates the comment, value and/or is_alias_for of the known constant if they were empty/nil.
def add_constant constant return constant unless @document_self # HACK: avoid duplicate 'PI' & 'E' in math.c (1.8.7 source code) # (this is a #ifdef: should be handled by the C parser) known = @constants_hash[constant.name] if known then known.comment = constant.comment if known.comment.empt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_constant(const)\n raise \"Must be Parfait #{const}\" unless const.is_a?(Parfait::Object)\n @constants << const\n end", "def add_constant_definition(key, value)\n constant_definitions[key] = value\n end", "def add_constant constant\n @display.print_constant constant\n ...
[ "0.6360792", "0.6305321", "0.61560625", "0.5922608", "0.5737963", "0.5585562", "0.5506059", "0.5400589", "0.5360444", "0.52682036", "0.51512283", "0.51340926", "0.5054502", "0.5047111", "0.5045273", "0.50311947", "0.502559", "0.49881724", "0.4955066", "0.49377713", "0.4930395...
0.73754466
0
Adds included module +include+ which should be an RDoc::Include
def add_include include add_to @includes, include include end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_include(include)\n @includes << include\n end", "def add_include(include)\n object_class.record_location self\n return include unless @document_self\n object_class.add_include include\n end", "def add_include(include)\n add_to @includes, include\n end", "def include(header)\n @...
[ "0.7648921", "0.75197875", "0.7488951", "0.7237349", "0.7085069", "0.7085069", "0.7081048", "0.6997003", "0.6965973", "0.6949048", "0.68625814", "0.6857391", "0.68294686", "0.6799904", "0.6799904", "0.6794034", "0.67509246", "0.6736874", "0.66327673", "0.65894645", "0.6566837...
0.7658432
0
Adds extension module +ext+ which should be an RDoc::Extend
def add_extend ext add_to @extends, ext ext end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_extends out, extends\n add_extension_modules out, 'Extended by', extends\n end", "def add_extension(mod, options = {})\n self.extend(mod)\n options = mod.send(:prepare_options, options || {}) if mod.respond_to?(:prepare_options)\n extension_options[mod] = options\n ...
[ "0.7079726", "0.6803315", "0.67516327", "0.6495801", "0.64451236", "0.6434432", "0.6406136", "0.64056814", "0.6402059", "0.63079286", "0.6306532", "0.62616307", "0.62616307", "0.6253952", "0.62142795", "0.6175813", "0.61560297", "0.61424", "0.6087404", "0.60629845", "0.606298...
0.7653484
0
Adds +method+ if not already there. If it is (as method or attribute), updates the comment if it was empty.
def add_method method return method unless @document_self # HACK: avoid duplicate 'new' in io.c & struct.c (1.8.7 source code) key = method.pretty_name known = @methods_hash[key] if known then if @store then # otherwise we are loading known.comment = method.comment if known.comment.e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_method(method)\n # THREAD CRITICAL BEGIN\n remove_method(method.signature)\n @method.push(method)\n method.multimethod = self\n @lookup_method = { } # flush cache\n # THREAD CRITICAL END\n end", "def add(method)\n key = [method.receiver, method.name]\n @methods[key]...
[ "0.6606405", "0.6534216", "0.648925", "0.6463064", "0.623774", "0.603973", "0.6027519", "0.5975975", "0.5958464", "0.5938618", "0.5845048", "0.5841438", "0.5799941", "0.5794936", "0.5705455", "0.57024896", "0.57024896", "0.56914246", "0.563983", "0.5601402", "0.5591044", "0...
0.7191578
0
Adds a module named +name+. If RDoc already knows +name+ is a class then that class is returned instead. See also add_class.
def add_module(class_type, name) mod = @classes[name] || @modules[name] return mod if mod full_name = child_name name mod = @store.modules_hash[full_name] || class_type.new(name) add_class_or_module mod, @modules, @store.modules_hash end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_module(name)\n add_namespace(name, \"\")\n end", "def add_module(class_type, name)\n return @classes[name] if @classes.key? name\n\n add_class_or_module @modules, class_type, name, nil\n end", "def add_module(name)\n require name\n\n m = name.downcase.gsub(File::SEPARATOR, '_')\n ...
[ "0.7300372", "0.72432405", "0.69066375", "0.6628943", "0.64812917", "0.634941", "0.6305072", "0.62513256", "0.624171", "0.6185089", "0.60262287", "0.58936584", "0.5887879", "0.58654994", "0.5835469", "0.5803901", "0.5803745", "0.57476884", "0.5736176", "0.5731915", "0.5648079...
0.71248907
2
Adds a module by +RDoc::NormalModule+ instance. See also add_module.
def add_module_by_normal_module(mod) add_class_or_module mod, @modules, @store.modules_hash end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add(module_object)\n @additional_modules << module_object\n end", "def on_module(node)\n define_module(node, DefinitionBuilder::RubyModule)\n end", "def add_module(name)\n add_namespace(name, \"\")\n end", "def method_missing(method, *args)\n add_module(method, *args)\n ...
[ "0.6811048", "0.67276955", "0.6489925", "0.64676905", "0.6397813", "0.6368307", "0.63525164", "0.62815386", "0.62746125", "0.6197487", "0.61784", "0.61185104", "0.6072431", "0.60593134", "0.597062", "0.5860002", "0.58418906", "0.57477564", "0.5686671", "0.568311", "0.5681711"...
0.69546705
0
Adds an alias from +from+ (a class or module) to +name+ which was defined in +file+.
def add_module_alias from, from_name, to, file return from if @done_documenting to_full_name = child_name to.name # if we already know this name, don't register an alias: # see the metaprogramming in lib/active_support/basic_object.rb, # where we already know BasicObject is a class when we find ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def alias(name)\n @aliases << convert(name)\n end", "def alias(name)\n @aliases << convert(name)\n end", "def alias(name)\n @db.open_class(name) do |c|\n c.type = @klass.type\n c.library = @library\n c.aliasof = @klass\n c.source = \"Alias of [[c:#{@klass.name...
[ "0.5760751", "0.5760751", "0.5737383", "0.5718563", "0.55254257", "0.5436217", "0.5392288", "0.5276071", "0.5233162", "0.52025694", "0.5193752", "0.51925343", "0.513731", "0.5113119", "0.5046442", "0.5041449", "0.5038883", "0.5024179", "0.5021755", "0.49822807", "0.49539554",...
0.7311055
0
Adds +require+ to this context's top level
def add_require(require) return require unless @document_self if RDoc::TopLevel === self then add_to @requires, require else parent.add_require require end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_require(require)\n if RDoc::TopLevel === self then\n add_to @requires, require\n else\n parent.add_require require\n end\n end", "def require!\n @required = true\n end", "def require!\n @required = true\n end", "def add_require(required)\n add_to(@requires, re...
[ "0.7312065", "0.69136065", "0.69136065", "0.6783368", "0.6557214", "0.65096784", "0.6487614", "0.6402223", "0.6365473", "0.6320908", "0.6268028", "0.6153088", "0.61397976", "0.6002612", "0.6001405", "0.5989213", "0.5981051", "0.59129", "0.58845395", "0.583707", "0.5833934", ...
0.7184582
1
Returns a section with +title+, creating it if it doesn't already exist. +comment+ will be appended to the section's comment. A section with a +title+ of +nil+ will return the default section. See also RDoc::Context::Section
def add_section title, comment = nil if section = @sections[title] then section.add_comment comment if comment else section = Section.new self, title, comment @sections[title] = section end section end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def section\n return @section if @section\n\n @section = parent.add_section @section_title if parent\n end", "def create_new_section(title, options={})\n send_request('create_new_section', normalize_options(title, options))\n end", "def section title, sym = nil, &block\n raise \"Section alr...
[ "0.6591449", "0.6278077", "0.6197155", "0.6073115", "0.6015045", "0.597072", "0.59274215", "0.5921573", "0.57885647", "0.56609195", "0.5540204", "0.55267537", "0.54794115", "0.5428692", "0.5393329", "0.53109014", "0.52812773", "0.5279272", "0.5272033", "0.5212807", "0.5189280...
0.80793333
0
Adds +thing+ to the collection +array+
def add_to array, thing array << thing if @document_self thing.parent = self thing.store = @store if @store thing.section = current_section end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_to_array(array, item)\n array << item\nend", "def add_to_array!(array, item)\n array << item\nend", "def add_item(array, item)\n\tarray << item\nend", "def add_item(array, item)\n\tarray.push(item)\nend", "def add_to_array(array, item)\n\tarray += [item]\n\tp array\nend", "def add_to_array attr...
[ "0.71435684", "0.7126732", "0.70975834", "0.6996228", "0.6969237", "0.64890677", "0.6450133", "0.64114755", "0.64043283", "0.6352221", "0.6290028", "0.6276617", "0.62760144", "0.62748975", "0.6266579", "0.6214797", "0.6200905", "0.61668664", "0.60811496", "0.600478", "0.59722...
0.6572398
5
Is there any content? This means any of: comment, aliases, methods, attributes, external aliases, require, constant. Includes and extends are also checked unless includes == false.
def any_content(includes = true) @any_content ||= !( @comment.empty? && @method_list.empty? && @attributes.empty? && @aliases.empty? && @external_aliases.empty? && @requires.empty? && @constants.empty? ) @any_content || (includes && !(@includes + @extends).empty? ) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def has_content?\n !content.nil?\n end", "def contents_detected?\n true\n end", "def possibly_include_hidden?; end", "def content?\n !content.nil? && !content.empty?\n end", "def includes_definition?\n includes_arguments? || runnable? || argument_parsing_disabled? ||\n ...
[ "0.6751396", "0.6738127", "0.66045684", "0.64374244", "0.6351147", "0.63484895", "0.63104135", "0.62951505", "0.62780195", "0.62536335", "0.62536335", "0.62528044", "0.62411076", "0.6213229", "0.6207346", "0.6138736", "0.61119616", "0.6108385", "0.6108385", "0.61004996", "0.6...
0.84118366
0
Creates the full name for a child with +name+
def child_name name if name =~ /^:+/ $' #' elsif RDoc::TopLevel === self then name else "#{self.full_name}::#{name}" end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def for_child(name)\n Namer.new([@name, name].join(\"_\"), @options.merge(:pluralize => false))\n end", "def append_name\n self.name = self.content\n end", "def create_child( name )\n account = build_child( name )\n attach_child( account )\n return account\n end", "def full_...
[ "0.7412919", "0.6945398", "0.6890031", "0.6817098", "0.67733216", "0.6688121", "0.66856474", "0.6680469", "0.6680469", "0.6680469", "0.6680469", "0.6680469", "0.6627734", "0.6614471", "0.6588744", "0.657352", "0.6537594", "0.65213597", "0.65133035", "0.6508026", "0.65071625",...
0.6415566
29
Array of classes in this context
def classes @classes.values end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def classes\n return [] unless classes = self[\"class\"]\n classes.strip.split(/\\s+/)\n end", "def class_list\n array = []\n ObjectSpace.each_object(Class) {|m| array << m }\n array\n end", "def classes\n @classes\n end", "def classes\n self\n end", "de...
[ "0.8122355", "0.81009805", "0.7979909", "0.782357", "0.7755458", "0.77007484", "0.75112116", "0.74795264", "0.7375401", "0.73752046", "0.7347134", "0.73027664", "0.7292532", "0.7276362", "0.7179357", "0.71643746", "0.71469176", "0.7108586", "0.70936656", "0.6922274", "0.68818...
0.7991983
3
All classes and modules in this namespace
def classes_and_modules classes + modules end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def all_objects\n Registry.all(:root, :module, :class)\n end", "def modules; end", "def modules; end", "def modules; end", "def classes; end", "def all_classes_and_modules\n result = []\n ObjectSpace.each_object(Module) { |m| result << m }\n result.sort_by {|m| m.name}\nend", "def classe...
[ "0.73086095", "0.7179177", "0.7179177", "0.7179177", "0.68885154", "0.6874754", "0.6756344", "0.66643345", "0.6662459", "0.6619289", "0.6596781", "0.6596781", "0.6596781", "0.6596781", "0.6596781", "0.6596781", "0.6596781", "0.6596781", "0.6566371", "0.6566371", "0.6566371", ...
0.7224902
2
Hash of classes keyed by class name
def classes_hash @classes end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def classes_hash\n @classes_hash\n end", "def to_hash\n\t\t@classes.map { |name,klass| klass.to_hash }.reduce({}) { |sum,v| sum.merge( v) }\n\tend", "def classes\n return @classes if @classes\n\n @classes = {}\n\n @stores.each do |store|\n store.cache[:modules].each do |mod|\n # using ...
[ "0.784064", "0.7820312", "0.7431189", "0.74256", "0.7351254", "0.7343619", "0.7338805", "0.7338805", "0.6976958", "0.6957661", "0.6957661", "0.69293666", "0.69053715", "0.6758976", "0.66891986", "0.6608346", "0.6605831", "0.6576335", "0.6571668", "0.6486273", "0.64454395", ...
0.830038
1
The current documentation section that new items will be added to. If temporary_section is available it will be used.
def current_section if section = @temporary_section then @temporary_section = nil else section = @current_section end section end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def section\n return @section if @section\n\n @section = parent.add_section @section_title if parent\n end", "def set_current_section title, comment\n @current_section = add_section title, comment\n end", "def section\n @section || path_section\n end", "def add_new_section\n @section =...
[ "0.6440524", "0.6285489", "0.59577644", "0.5866955", "0.58553433", "0.58317703", "0.5814274", "0.5801033", "0.57471496", "0.5718803", "0.5656593", "0.56502753", "0.5530627", "0.5455015", "0.53967094", "0.53764665", "0.53597206", "0.5353882", "0.53531075", "0.5336095", "0.5306...
0.7400857
0
Is part of this thing was defined in +file+?
def defined_in?(file) @in_files.include?(file) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def include?(file)\n manifest_entry[file] != nil\n end", "def was_required?(file)\n rex = Regexp.new(\"/#{Regexp.quote(file)}\\.(so|o|sl|rb)?\")\n $LOADED_FEATURES.find { |f| f =~ rex }\nend", "def include?(filename)\n \n end", "def defined?(name); end", "def defined?(name); end", "...
[ "0.66850275", "0.6595234", "0.65786016", "0.65326995", "0.65326995", "0.6470737", "0.64606255", "0.6355231", "0.6334064", "0.62761986", "0.62758213", "0.62758213", "0.62270665", "0.6215806", "0.6192587", "0.614174", "0.61226976", "0.61037636", "0.60969496", "0.60896873", "0.6...
0.7523269
1
Iterator for ancestors for ducktyping. Does nothing. See RDoc::ClassModuleeach_ancestor. This method exists to make it easy to work with Context subclasses that aren't part of RDoc.
def each_ancestor # :nodoc: end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def each_ancestor\n ancestors = [self]\n while not ancestors.last.parent.nil?\n ancestors << ancestors.last.parent\n end\n ancestors.reverse_each { |a| yield a }\n end", "def ancestors\n itr = self\n res = []\n until itr.top_level?\n itr = itr.parents.first\n res << itr\n ...
[ "0.7161925", "0.71490955", "0.7125632", "0.7033297", "0.70306563", "0.68961775", "0.689527", "0.688187", "0.6879477", "0.6809", "0.6809", "0.6809", "0.6809", "0.68064076", "0.6734145", "0.667016", "0.6654803", "0.6654803", "0.664742", "0.6644724", "0.6621337", "0.6614372", ...
0.74303854
0
Iterator for classes and modules
def each_classmodule(&block) # :yields: module classes_and_modules.sort.each(&block) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_iterator\n\t\tend", "def iterator()\n raise NotImplementedError\n end", "def each\n if @java_object.getClass.getMethods.any? {|m| m.getName == \"iterator\"}\n i = @java_object.iterator\n while i.hasNext\n yield wrap_java_object(i.next)\n end\n end\n end", ...
[ "0.62884337", "0.624456", "0.623768", "0.62347955", "0.62312394", "0.61823964", "0.6165191", "0.61115366", "0.6018802", "0.59806883", "0.59549266", "0.5924119", "0.59124416", "0.59124416", "0.5907059", "0.59039646", "0.59039646", "0.5817118", "0.57864165", "0.57806027", "0.57...
0.68724763
1
Iterator for included modules
def each_include # :yields: include @includes.each do |i| yield i end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def included_modules() end", "def including_modules\n if block_given?\n ::Module.instances do |m|\n yield m if m.included_modules.include? self\n end\n else\n enum_for :including_modules\n end\n end", "def included_modules; end", "def included_modules\n end", "def modules\n...
[ "0.7355934", "0.7005262", "0.69577664", "0.68629885", "0.6768104", "0.66213644", "0.64940286", "0.644268", "0.64360464", "0.63482654", "0.6311816", "0.6276955", "0.6220415", "0.62055194", "0.6184411", "0.6182206", "0.6182206", "0.6182206", "0.6161017", "0.6161017", "0.6113353...
0.70704126
2
Iterator for extension modules
def each_extend # :yields: extend @extends.each do |e| yield e end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def each_extension(&block)\n self.ext.aliases.each(block)\n end", "def extension_modules\n local_extensions =\n class <<self\n included_modules-Object.included_modules\n end\n if local_extensions.size > 0\n local_extensions\n else\n [] # ...
[ "0.65776944", "0.6566271", "0.65272665", "0.6418333", "0.6404252", "0.6362264", "0.63104874", "0.6280166", "0.625282", "0.6219727", "0.6201687", "0.6177798", "0.61399055", "0.6119126", "0.6119126", "0.6119126", "0.6055342", "0.6055342", "0.6055342", "0.60502106", "0.6029214",...
0.65401226
2
Iterator for each section's contents sorted by title. The +section+, the section's +constants+ and the sections +attributes+ are yielded. The +constants+ and +attributes+ collections are sorted. To retrieve methods in a section use methods_by_type with the optional +section+ parameter. NOTE: Do not edit collections yie...
def each_section # :yields: section, constants, attributes return enum_for __method__ unless block_given? constants = @constants.group_by do |constant| constant.section end attributes = @attributes.group_by do |attribute| attribute.section end constants.default = [] attributes.default = [] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def section_contents\n used_sections = {}\n\n each_method do |method|\n next unless method.display?\n\n used_sections[method.section] = true\n end\n\n # order found sections\n sections = sort_sections.select do |section|\n used_sections[section]\n end\n\n # only the default sect...
[ "0.68070155", "0.6479389", "0.61228085", "0.60601753", "0.5954891", "0.5946882", "0.58664006", "0.58027864", "0.56560904", "0.55918837", "0.5559921", "0.5473152", "0.5444388", "0.5440163", "0.535225", "0.53310055", "0.52644557", "0.5212977", "0.51701", "0.5145766", "0.5138648...
0.7872429
0
Finds an attribute +name+ with singleton value +singleton+.
def find_attribute(name, singleton) name = $1 if name =~ /^(.*)=$/ @attributes.find { |a| a.name == name && a.singleton == singleton } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_attribute_named(name)\n @attributes.find { |m| m.name == name }\n end", "def find_attribute_named(name)\n case name\n when /\\A#/ then\n find_attribute name[1..-1], false\n when /\\A::/ then\n find_attribute name[2..-1], true\n else\n @attributes.find { |a| a.name == name ...
[ "0.63335073", "0.62556833", "0.61533725", "0.60297656", "0.5878856", "0.5782432", "0.5760131", "0.56037915", "0.55621016", "0.55593663", "0.55490375", "0.55305606", "0.5525074", "0.55236566", "0.5503968", "0.54723686", "0.54599565", "0.5438508", "0.53871816", "0.53226596", "0...
0.873894
0
Finds an attribute with +name+ in this context
def find_attribute_named(name) case name when /\A#/ then find_attribute name[1..-1], false when /\A::/ then find_attribute name[2..-1], true else @attributes.find { |a| a.name == name } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_attribute_named(name)\n @attributes.find { |m| m.name == name }\n end", "def with(name)\r\n @attributes.find { |attr| attr.name == name }\r\n end", "def attribute(name)\n attributes.each { |a| return a if a.property.id == name }\n nil\n end", "def attribute(name)\n...
[ "0.8548864", "0.8174176", "0.80076694", "0.7600236", "0.7598654", "0.75473773", "0.7537689", "0.7537689", "0.75110275", "0.7493048", "0.7457514", "0.7452494", "0.731419", "0.7229673", "0.7226676", "0.7189929", "0.71857905", "0.7165404", "0.71653235", "0.7150236", "0.71442413"...
0.78676313
3
Finds a class method with +name+ in this context
def find_class_method_named(name) @method_list.find { |meth| meth.singleton && meth.name == name } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_method_named(name)\n @method_list.find { |meth| meth.name == name }\n end", "def find_method_named(name)\n case name\n when /\\A#/ then\n find_method name[1..-1], false\n when /\\A::/ then\n find_method name[2..-1], true\n else\n @method_list.find { |meth| meth.name == nam...
[ "0.77514476", "0.7654033", "0.7648475", "0.7454765", "0.7022304", "0.7022304", "0.67780215", "0.6748004", "0.6713989", "0.66129404", "0.6556658", "0.6537433", "0.64900714", "0.64395016", "0.6427036", "0.64183664", "0.64160454", "0.63891256", "0.6355525", "0.63506716", "0.6333...
0.83503747
0
Finds a constant with +name+ in this context
def find_constant_named(name) @constants.find do |m| m.name == name || m.full_name == name end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_constant_named(name)\n @constants.find {|m| m.name == name}\n end", "def find_constant(name, base_object=self)\n begin\n const = base_object.constants.detect{|cnst| cnst == camelcase(name)}\n base_object.module_eval const\n rescue Exception => e\n puts \"#{name.camelca...
[ "0.8774221", "0.77671033", "0.7204522", "0.7157349", "0.7009848", "0.6996606", "0.6996606", "0.6987676", "0.6868325", "0.68478507", "0.6801009", "0.6622147", "0.6622147", "0.6622147", "0.65597636", "0.6539827", "0.65328753", "0.6499835", "0.64950925", "0.6490531", "0.64848256...
0.87997997
0
Find a module at a higher scope
def find_enclosing_module_named(name) parent && parent.find_module_named(name) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_module_named(name)\n find_class_or_module_named(name) || find_enclosing_module_named(name)\n end", "def find_module_named(name)\n res = @modules[name] || @classes[name]\n return res if res\n return self if self.name == name\n find_enclosing_module_named name\n end", "def find_module_n...
[ "0.7400339", "0.73072636", "0.73072636", "0.72130054", "0.6907128", "0.682013", "0.6730634", "0.66978455", "0.6653885", "0.65736467", "0.65675634", "0.65220577", "0.6406282", "0.6286041", "0.62485", "0.61141235", "0.61105156", "0.6084711", "0.6078022", "0.6073266", "0.6072541...
0.714531
5
Finds an external alias +name+ with singleton value +singleton+.
def find_external_alias(name, singleton) @external_aliases.find { |m| m.name == name && m.singleton == singleton } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_external_alias_named(name)\n case name\n when /\\A#/ then\n find_external_alias name[1..-1], false\n when /\\A::/ then\n find_external_alias name[2..-1], true\n else\n @external_aliases.find { |a| a.name == name }\n end\n end", "def find_method(name, singleton)\n @metho...
[ "0.66949993", "0.6111369", "0.60935336", "0.58680135", "0.5729701", "0.56688833", "0.5638787", "0.561036", "0.56071", "0.55122566", "0.5506022", "0.5436229", "0.5424073", "0.53887033", "0.53284043", "0.5324427", "0.53032357", "0.5291006", "0.5288437", "0.5278002", "0.5269952"...
0.8847235
0
Finds an external alias with +name+ in this context
def find_external_alias_named(name) case name when /\A#/ then find_external_alias name[1..-1], false when /\A::/ then find_external_alias name[2..-1], true else @external_aliases.find { |a| a.name == name } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_external_alias(name, singleton)\n @external_aliases.find { |m| m.name == name && m.singleton == singleton }\n end", "def alias(name)\n @aliases << normalize(name)\n nil\n end", "def lookup(name)\n all.lookup(name)\n end", "def alias(name)\n @aliases << convert(name)\n en...
[ "0.8092631", "0.69873595", "0.6556129", "0.6439114", "0.6439114", "0.6287383", "0.6244523", "0.6243687", "0.6227093", "0.61137915", "0.61035013", "0.6100155", "0.6078852", "0.60722786", "0.6056607", "0.60508686", "0.60455203", "0.6028703", "0.602219", "0.59869105", "0.5977696...
0.8510145
0
Finds a file with +name+ in this context
def find_file_named name @store.find_file_named name end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_file_named name\n @files_hash[name]\n end", "def find_file(name)\n if (explicit = folder/name.to_s).file?\n explicit\n else\n folder.glob(\"#{name}.*\").find{|f| f.file?}\n end\n end", "def find_file(name)\n if name =~ /^\\//\n @w...
[ "0.7883881", "0.7724089", "0.7677806", "0.7583546", "0.74139017", "0.73796827", "0.73642457", "0.6947606", "0.6791772", "0.67859334", "0.6726607", "0.67139167", "0.6672547", "0.6663285", "0.66321915", "0.66321915", "0.6569022", "0.6482925", "0.6435691", "0.64097375", "0.63868...
0.766702
3
Finds an instance method with +name+ in this context
def find_instance_method_named(name) @method_list.find { |meth| !meth.singleton && meth.name == name } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_instance_method_named(name)\n @method_list.find { |meth| meth.name == name && !meth.singleton }\n end", "def find_method_named(name)\n @method_list.find { |meth| meth.name == name }\n end", "def find_class_method_named(name)\n @method_list.find { |meth| meth.singleton && meth.name == name }...
[ "0.8298282", "0.7906578", "0.7865073", "0.7406749", "0.6951323", "0.6851641", "0.6851641", "0.67860454", "0.6692086", "0.66695946", "0.6590393", "0.6585505", "0.65041673", "0.6485068", "0.64681864", "0.6440243", "0.6399975", "0.6348595", "0.63442403", "0.6323913", "0.6316126"...
0.84985524
0
Finds a method, constant, attribute, external alias, module or file named +symbol+ in this context.
def find_local_symbol(symbol) find_method_named(symbol) or find_constant_named(symbol) or find_attribute_named(symbol) or find_external_alias_named(symbol) or find_module_named(symbol) or find_file_named(symbol) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_local_symbol(symbol)\n find_method_named(symbol) or\n find_constant_named(symbol) or\n find_attribute_named(symbol) or\n find_module_named(symbol) or\n find_file_named(symbol)\n end", "def find_symbol(symbol)\n find_symbol_module(symbol) || find_local_symbol(symbol)\n end", "def fi...
[ "0.804948", "0.78309673", "0.7792621", "0.76675546", "0.74947345", "0.7483889", "0.7474187", "0.7328464", "0.6920442", "0.66967916", "0.6650388", "0.6549467", "0.6142783", "0.60395616", "0.59887385", "0.593977", "0.5917489", "0.5877985", "0.5714956", "0.567381", "0.56330293",...
0.8083958
0
Finds a method named +name+ with singleton value +singleton+.
def find_method(name, singleton) @method_list.find { |m| if m.singleton m.name == name && m.singleton == singleton else m.name == name && !m.singleton && !singleton end } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_class_method_named(name)\n @method_list.find { |meth| meth.singleton && meth.name == name }\n end", "def find_instance_method_named(name)\n @method_list.find { |meth| meth.name == name && !meth.singleton }\n end", "def find_instance_method_named(name)\n @method_list.find { |meth| !meth.sing...
[ "0.75796986", "0.7469785", "0.74260885", "0.6928082", "0.6917827", "0.683098", "0.64963865", "0.6108599", "0.5992845", "0.5973679", "0.5959117", "0.5935301", "0.58672684", "0.58571714", "0.58571714", "0.5797307", "0.57933563", "0.57076174", "0.57047874", "0.5693354", "0.56528...
0.89025164
0
Finds a instance or module method with +name+ in this context
def find_method_named(name) case name when /\A#/ then find_method name[1..-1], false when /\A::/ then find_method name[2..-1], true else @method_list.find { |meth| meth.name == name } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_instance_method_named(name)\n @method_list.find { |meth| !meth.singleton && meth.name == name }\n end", "def find_method_named(name)\n @method_list.find { |meth| meth.name == name }\n end", "def find_instance_method_named(name)\n @method_list.find { |meth| meth.name == name && !meth.singlet...
[ "0.8216726", "0.81867087", "0.8030796", "0.7844836", "0.70879817", "0.70879817", "0.70143133", "0.69328254", "0.69222796", "0.68998945", "0.68552965", "0.67939436", "0.6748231", "0.6662216", "0.66603065", "0.66493845", "0.66160387", "0.6605122", "0.6549374", "0.649014", "0.64...
0.7910301
3
Find a module with +name+ using ruby's scoping rules
def find_module_named(name) res = @modules[name] || @classes[name] return res if res return self if self.name == name find_enclosing_module_named name end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_module_named(name)\n find_class_or_module_named(name) || find_enclosing_module_named(name)\n end", "def find_module_named(name)\n find_class_or_module(name)\n end", "def find_module_named name\n @modules_hash[name]\n end", "def find_enclosing_module_named(name)\n parent && parent.find...
[ "0.8410289", "0.83550966", "0.8039156", "0.76774156", "0.76774156", "0.6853219", "0.67958283", "0.6604542", "0.6585983", "0.6559129", "0.6542654", "0.6493599", "0.64772236", "0.6455078", "0.64151895", "0.63964045", "0.6388116", "0.6383519", "0.6367595", "0.6309562", "0.630866...
0.84094614
2
Look up +symbol+, first as a module, then as a local symbol.
def find_symbol(symbol) find_symbol_module(symbol) || find_local_symbol(symbol) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_local_symbol(symbol)\n find_class_or_module_named(symbol) || super\n end", "def find_local_symbol(symbol)\n find_class_or_module(symbol) || super\n end", "def find_local_symbol(symbol)\n find_method_named(symbol) or\n find_constant_named(symbol) or\n find_attribute_named(symbol) or\n ...
[ "0.7791537", "0.7752147", "0.76006943", "0.751997", "0.72387135", "0.72240525", "0.6967656", "0.6713632", "0.6403553", "0.61487633", "0.60846156", "0.60174376", "0.59115595", "0.5909721", "0.5886694", "0.5878266", "0.5863568", "0.5844008", "0.5837058", "0.583417", "0.582779",...
0.7647139
2
Look up a module named +symbol+.
def find_symbol_module(symbol) result = nil # look for a class or module 'symbol' case symbol when /^::/ then result = @store.find_class_or_module symbol when /^(\w+):+(.+)$/ suffix = $2 top = $1 searched = self while searched do mod = searched.find_module_name...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_symbol(symbol)\n find_symbol_module(symbol) || find_local_symbol(symbol)\n end", "def look_for(symbol)\n env = self.find {|e| e.symbol.equal? symbol}\n return env unless env.nil?\n raise NameError.new(\"#{symbol} not found\", symbol)\n end", "def find_symbol(symbol, method = nil)...
[ "0.7613245", "0.717394", "0.716975", "0.7158498", "0.689558", "0.68094707", "0.6762756", "0.67237914", "0.65469694", "0.6536426", "0.64996403", "0.64777035", "0.6459135", "0.628737", "0.6212545", "0.616095", "0.6081649", "0.6078214", "0.60115325", "0.60010827", "0.5988319", ...
0.7751748
0
The full name for this context. This method is overridden by subclasses.
def full_name '(unknown)' end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def short_name\n @context.name\n end", "def readable_context_name\r\n self.name\r\n end", "def display_name\n @_context[:display_name]\n end", "def realname\r\n return for_context(nil, false) { |c| c.realname }\r\n end", "def to_s\n\t\treturn \"Anonymous context\" if @name == nil\n\...
[ "0.8379103", "0.8153546", "0.7981624", "0.7820937", "0.7670675", "0.7448798", "0.7448798", "0.7354039", "0.7340521", "0.7325298", "0.7290881", "0.72817653", "0.7263044", "0.7217175", "0.7203801", "0.71952325", "0.7183583", "0.7182248", "0.7173315", "0.7168612", "0.7168612", ...
0.0
-1
Does this context and its methods and constants all have documentation? (Yes, fully documented doesn't mean everything.)
def fully_documented? documented? and attributes.all? { |a| a.documented? } and method_list.all? { |m| m.documented? } and constants.all? { |c| c.documented? } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def doc; end", "def doc; end", "def doc; end", "def doc; end", "def context_methods; end", "def docs; end", "def context; end", "def context; end", "def context; end", "def context; end", "def context; end", "def context; end", "def context; end", "def context; end", "def context; end",...
[ "0.70949155", "0.70949155", "0.70949155", "0.70949155", "0.7085154", "0.70010835", "0.6878586", "0.6878586", "0.6878586", "0.6878586", "0.6878586", "0.6878586", "0.6878586", "0.6878586", "0.6878586", "0.6878586", "0.6878586", "0.6878586", "0.6878586", "0.6878586", "0.6878586"...
0.629832
36
URL for this with a +prefix+
def http_url(prefix) path = name_for_path path = path.gsub(/<<\s*(\w*)/, 'from-\1') if path =~ /<</ path = [prefix] + path.split('::') File.join(*path.compact) + '.html' end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def url(prefix, stem)\n if prefix == ''\n \"/#{stem}/#{self.id}\"\n else\n \"#{prefix}/#{stem}/#{self.id}\"\n end\n end", "def the_url_prefix\n settings.url_prefix\n end", "def route_name_prefix prefix\n @route_name_prefix = prefix\n end", "def http_url(pre...
[ "0.7873792", "0.7086624", "0.70406485", "0.70168334", "0.6990933", "0.6905102", "0.6893163", "0.6893163", "0.68653816", "0.68653816", "0.68653816", "0.68653816", "0.68653816", "0.68653816", "0.68653816", "0.68653816", "0.68653816", "0.68653816", "0.6806203", "0.67744654", "0....
0.70582664
2
Instance methods TODO remove this later
def instance_method_list warn '#instance_method_list is obsoleted, please use #instance_methods' @instance_methods ||= method_list.reject { |a| a.singleton } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def private; end", "def implementation; end", "def implementation; end", "def initialize\n \n end", "def specie; end", "def specie; end", "def specie; end", "def specie; end", "def initialize\n\t\t\n\tend", "def instance; end", "def instance; end", "def instance; end", "def initia...
[ "0.820554", "0.69367754", "0.69367754", "0.6887936", "0.6779964", "0.6779964", "0.6779964", "0.6779964", "0.67204136", "0.6694297", "0.6694297", "0.6694297", "0.664673", "0.6639764", "0.65800136", "0.65800136", "0.65800136", "0.65800136", "0.6561246", "0.6559725", "0.6559725"...
0.0
-1
Breaks method_list into a nested hash by type ('class' or 'instance') and visibility (+:public+, +:protected+, +:private+). If +section+ is provided only methods in that RDoc::Context::Section will be returned.
def methods_by_type section = nil methods = {} TYPES.each do |type| visibilities = {} RDoc::VISIBILITIES.each do |vis| visibilities[vis] = [] end methods[type] = visibilities end each_method do |method| next if section and not method.section == section meth...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def methods_by_section\n unless @methods_by_section\n @methods_by_section = {}\n (self.doc/XPATH_TO_METHOD_SECTION_HEADER).each do |method_section|\n if collector_key = METHOD_HEADING_TABLE[method_section.inner_html]\n @methods_by_section[collector_key] = find_methods_in_section(method...
[ "0.68748116", "0.5820219", "0.5565916", "0.54100096", "0.53002506", "0.5233696", "0.5160995", "0.51057863", "0.5096201", "0.5089872", "0.49676767", "0.4956702", "0.4954363", "0.491264", "0.49044257", "0.48738953", "0.48196995", "0.4813159", "0.48085707", "0.47967163", "0.4792...
0.73422706
0
Yields AnyMethod and Attr entries matching the list of names in +methods+.
def methods_matching(methods, singleton = false, &block) (@method_list + @attributes).each do |m| yield m if methods.include?(m.name) and m.singleton == singleton end each_ancestor do |parent| parent.methods_matching(methods, singleton, &block) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def methods_matching(methods, singleton = false)\n count = 0\n\n @method_list.each do |m|\n if methods.include? m.name and m.singleton == singleton then\n yield m\n count += 1\n end\n end\n\n return if count == methods.size || singleton\n\n @attributes.each do |a|\n yiel...
[ "0.7336663", "0.65874213", "0.62439257", "0.6054902", "0.6045262", "0.60221404", "0.59898514", "0.5984989", "0.5969248", "0.5930446", "0.58969754", "0.5849976", "0.5780449", "0.57685304", "0.57378685", "0.57125574", "0.57026404", "0.5698891", "0.5692197", "0.5668572", "0.5662...
0.6838769
1
Array of modules in this context
def modules @modules.values end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def modules\n @modules ||= Array.new\n @modules\nend", "def modules\n @modules = @modules.call if @modules.is_a?(Proc)\n @modules\n end", "def app_modules\n @app_modules ||= []\n end", "def all_modules\n modules_hash.values\n end", "def modules\n @module_ids.collect {...
[ "0.823171", "0.78476393", "0.75807106", "0.7469659", "0.7451135", "0.7363158", "0.7363158", "0.7363158", "0.72734606", "0.72490853", "0.7222433", "0.7212792", "0.71435314", "0.71113086", "0.7054218", "0.7036702", "0.7036702", "0.69397724", "0.6864244", "0.67907023", "0.678876...
0.8100395
2
Hash of modules keyed by module name
def modules_hash @modules end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def modules_hash\n @modules_hash\n end", "def module_names\n @cache[:modules]\n end", "def all_modules\n modules_hash.values\n end", "def modules\n modules = {}\n\n begin\n mods = Pathname.new(@conf['mod_dir']).children.select(&:directory?)\n\n mods.each do |m|\n modules[m....
[ "0.7901912", "0.7311881", "0.7111287", "0.69157857", "0.6780014", "0.6690127", "0.6341178", "0.6341178", "0.63082105", "0.6283389", "0.6238645", "0.62369853", "0.61595345", "0.6156164", "0.6147382", "0.6127861", "0.612432", "0.6092543", "0.60706043", "0.6036588", "0.60330445"...
0.8119033
1
Name to use to generate the url. full_name by default.
def name_for_path full_name end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def full_name\n name\n end", "def full_name\n if @prefix != \"\"\n File.join(@prefix, @name)\n else\n @name\n end\n end", "def full_name\n full_path.collect(&:name).join(\" > \")\n end", "def full_name\n return \"#{origin_name.nil...
[ "0.7340078", "0.73369646", "0.7328412", "0.73231417", "0.71796024", "0.7142601", "0.7077292", "0.707061", "0.7054017", "0.7054017", "0.7020912", "0.6985432", "0.69760436", "0.6956576", "0.69450986", "0.6944951", "0.6908463", "0.6901721", "0.6898317", "0.689312", "0.6883658", ...
0.7560438
0
Changes the visibility for new methods to +visibility+
def ongoing_visibility=(visibility) @visibility = visibility end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_visibility container, vis_type, vis, singleton # :nodoc:\n new_methods = []\n\n case vis_type\n when 'module_function' then\n args = parse_symbol_arg\n container.set_visibility_for args, :private, false\n\n container.methods_matching args do |m|\n s_m = m.dup\n reco...
[ "0.78715193", "0.7578686", "0.7578686", "0.7387204", "0.7387204", "0.7387204", "0.7387204", "0.7387204", "0.71578246", "0.7109442", "0.7100963", "0.6938111", "0.6938111", "0.68700725", "0.67604315", "0.6654126", "0.66191673", "0.6557983", "0.6522661", "0.64660907", "0.6425078...
0.66224015
17
Record +top_level+ as a file +self+ is in.
def record_location(top_level) @in_files << top_level unless @in_files.include?(top_level) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def record_location top_level\n @ignored = false\n @suppressed = false\n @file = top_level\n end", "def top_level\n @top_level\n end", "def top_level\n if(options.show_status == true)\n puts status_string\n else\n super\n end\n #@ProjectF...
[ "0.7406819", "0.58699346", "0.5859228", "0.57302743", "0.55963975", "0.55963975", "0.5512924", "0.5500224", "0.5490704", "0.5474614", "0.5474614", "0.5438459", "0.540422", "0.5282255", "0.5277555", "0.5228967", "0.5227087", "0.5224711", "0.52211833", "0.5179953", "0.5171864",...
0.7290432
2
Should we remove this context from the documentation? The answer is yes if: received_nodoc is +true+ any_content is +false+ (not counting includes) All includes are modules (not a string), and their module has remove_from_documentation? == true All classes and modules have remove_from_documentation? == true
def remove_from_documentation? @remove_from_documentation ||= @received_nodoc && !any_content(false) && @includes.all? { |i| !i.module.is_a?(String) && i.module.remove_from_documentation? } && classes_and_modules.all? { |cm| cm.remove_from_documentation? } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_nodoc all_hash\n all_hash.keys.each do |name|\n context = all_hash[name]\n all_hash.delete(name) if context.remove_from_documentation?\n end\n end", "def documented?\n @received_nodoc or !@comment.empty?\n end", "def contextual_documentation(key)\n action_configuration.ha...
[ "0.6797465", "0.6603244", "0.615224", "0.60853595", "0.60728544", "0.597084", "0.59410435", "0.5918262", "0.56826246", "0.56195277", "0.5612407", "0.5455664", "0.54473805", "0.5425664", "0.5420236", "0.541322", "0.5396007", "0.53781503", "0.5346311", "0.5279798", "0.5262292",...
0.8229018
0
Removes methods and attributes with a visibility less than +min_visibility+. TODO mark the visibility of attributes in the template (if not public?)
def remove_invisible min_visibility return if [:private, :nodoc].include? min_visibility remove_invisible_in @method_list, min_visibility remove_invisible_in @attributes, min_visibility remove_invisible_in @constants, min_visibility end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_invisible_in array, min_visibility # :nodoc:\n if min_visibility == :public then\n array.reject! { |e|\n e.visibility != :public and not e.force_documentation\n }\n else\n array.reject! { |e|\n e.visibility == :private and not e.force_documentation\n }\n end\n ...
[ "0.7066731", "0.6578913", "0.61774606", "0.5959503", "0.59528434", "0.58811635", "0.57944727", "0.57742214", "0.5592035", "0.5449213", "0.5417643", "0.5396013", "0.5396013", "0.5373502", "0.5301875", "0.52935785", "0.528598", "0.528598", "0.528598", "0.528598", "0.528598", ...
0.81649137
0
Only called when min_visibility == :public or :private
def remove_invisible_in array, min_visibility # :nodoc: if min_visibility == :public then array.reject! { |e| e.visibility != :public and not e.force_documentation } else array.reject! { |e| e.visibility == :private and not e.force_documentation } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def visibility; end", "def visibility; end", "def visibility; end", "def visibility; end", "def visibility; end", "def remove_invisible min_visibility\n return if [:private, :nodoc].include? min_visibility\n remove_invisible_in @method_list, min_visibility\n remove_invisible_in @attributes, min_...
[ "0.78150976", "0.78150976", "0.78150976", "0.78150976", "0.78150976", "0.73212427", "0.7119693", "0.6923487", "0.6795035", "0.6795035", "0.67946243", "0.66587305", "0.66362846", "0.66308886", "0.660284", "0.6546356", "0.6546356", "0.6529231", "0.65253806", "0.6513501", "0.650...
0.671202
11
Tries to resolve unmatched aliases when a method or attribute has just been added.
def resolve_aliases added # resolve any pending unmatched aliases key = added.pretty_name unmatched_alias_list = @unmatched_alias_lists[key] return unless unmatched_alias_list unmatched_alias_list.each do |unmatched_alias| added.add_alias unmatched_alias, self @external_aliases.delete un...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_alias an_alias\n return an_alias unless @document_self\n\n method_attr = find_method(an_alias.old_name, an_alias.singleton) ||\n find_attribute(an_alias.old_name, an_alias.singleton)\n\n if method_attr then\n method_attr.add_alias an_alias, self\n else\n add_to @exter...
[ "0.659223", "0.64308864", "0.6380419", "0.63543326", "0.6340958", "0.62566304", "0.6205571", "0.6205571", "0.6202364", "0.6199284", "0.6139721", "0.6034094", "0.6006031", "0.5854497", "0.58315855", "0.5803503", "0.5783266", "0.5780575", "0.5780575", "0.5780575", "0.57298917",...
0.75988805
0
Returns RDoc::Context::Section objects referenced in this context for use in a table of contents.
def section_contents used_sections = {} each_method do |method| next unless method.display? used_sections[method.section] = true end # order found sections sections = sort_sections.select do |section| used_sections[section] end # only the default section is used ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sections\n children.select { |child| child.is_a? DocumentSection }\n end", "def sections\n return @sections\n end", "def sections\n @sections ||= context\n .public_methods\n .grep(/\\A(?!wait_)\\w+_section$\\z/)\n ...
[ "0.6964384", "0.6792722", "0.6694263", "0.6672429", "0.66650134", "0.6589039", "0.64794177", "0.64038885", "0.6361551", "0.63251585", "0.6219187", "0.6166695", "0.61494553", "0.61485773", "0.6081254", "0.6065094", "0.59659886", "0.59636486", "0.5956687", "0.59501094", "0.5857...
0.66097593
5
Sections in this context
def sections @sections.values end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sections\n @blocks.inject([]) {|collector, block|\n collector << block if block.is_a?(Section)\n collector\n }\n end", "def list_sections\n \n end", "def sections\n parsed {\n @sections\n }\n end", "def sections\n return @sections\n end",...
[ "0.74627376", "0.74415445", "0.7419335", "0.73679256", "0.7358485", "0.7299666", "0.7288523", "0.7286496", "0.7286496", "0.7247529", "0.7196894", "0.7087116", "0.701128", "0.7006992", "0.69738793", "0.69601244", "0.69116044", "0.6883647", "0.68704486", "0.6736083", "0.6736083...
0.7229939
10
Sets the current section to a section with +title+. See also add_section
def set_current_section title, comment @current_section = add_section title, comment end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_current_section(title, comment)\n @current_section = Section.new self, title, comment\n @sections << @current_section\n end", "def section_title(title)\n end", "def section title, sym = nil, &block\n raise \"Section already defined\" if @current_section\n raise \"Section #{title} al...
[ "0.7598502", "0.70259994", "0.6965131", "0.6831501", "0.66995543", "0.66731966", "0.66661334", "0.6665143", "0.65694195", "0.6543807", "0.6543354", "0.6543354", "0.6543354", "0.6543354", "0.6543354", "0.6543354", "0.6543354", "0.6543354", "0.6543354", "0.6543354", "0.6543354"...
0.8485709
0
Given an array +methods+ of method names, set the visibility of each to +visibility+
def set_visibility_for(methods, visibility, singleton = false) methods_matching methods, singleton do |m| m.visibility = visibility end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def expose(*meths)\n @exposed ||= []\n meths.each do |meth|\n @exposed << meth unless @exposed.include?(meth)\n end\n @exposed\n end", "def methods=(value)\n @methods = value\n end", "def update_visibility container, vis_type, vis, singleton #...
[ "0.63629305", "0.6227088", "0.6084018", "0.6022479", "0.5957162", "0.5778513", "0.57428813", "0.5602042", "0.552636", "0.55246156", "0.54850924", "0.5439126", "0.5380488", "0.53777075", "0.5354027", "0.5348545", "0.5338888", "0.5326484", "0.532487", "0.5279024", "0.52738774",...
0.7871182
1
Given an array +names+ of constants, set the visibility of each constant to +visibility+
def set_constant_visibility_for(names, visibility) names.each do |name| constant = @constants_hash[name] or next constant.visibility = visibility end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def visibility=(v); end", "def parse_constant_visibility(container, single, tk)\n args = parse_symbol_arg\n case tk[:text]\n when 'private_constant'\n vis = :private\n when 'public_constant'\n vis = :public\n else\n raise RDoc::Error, 'Unreachable'\n end\n container.set_consta...
[ "0.59374464", "0.57594365", "0.57323086", "0.57323086", "0.56554323", "0.56459606", "0.5624421", "0.5574471", "0.55477244", "0.55097806", "0.54969823", "0.5488759", "0.54027593", "0.53908694", "0.53765917", "0.53744686", "0.5351685", "0.5351685", "0.53082275", "0.5276496", "0...
0.8701112
0
Sorts sections alphabetically (default) or in TomDoc fashion (none, Public, Internal, Deprecated)
def sort_sections titles = @sections.map { |title, _| title } if titles.length > 1 and TOMDOC_TITLES_SORT == (titles | TOMDOC_TITLES).sort_by { |title| title.to_s } then @sections.values_at(*TOMDOC_TITLES).compact else @sections.sort_by { |title, _| title.to_s }.ma...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sections_sorted(&block)\n return to_enum(:sections_sorted) if ! block_given?\n @sections.values.sort { |a,b| \n # Tricky sort: ident is often an index but can be an abritrary string\n # depending on what the :parse_file plugin decided.\n # If a.to_i == b...
[ "0.6844146", "0.67255837", "0.65838075", "0.6328627", "0.6295226", "0.61892194", "0.61455846", "0.6105238", "0.60663146", "0.60245913", "0.5924805", "0.5915572", "0.5909418", "0.58165073", "0.5813227", "0.57084036", "0.5688608", "0.56808305", "0.5677077", "0.5649998", "0.5641...
0.7765977
0
Return the TopLevel that owns us FIXME we can be 'owned' by several TopLevel (see record_location & in_files)
def top_level return @top_level if defined? @top_level @top_level = self @top_level = @top_level.parent until RDoc::TopLevel === @top_level @top_level end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def top_level\n @top_level\n end", "def top_level\n @top_level ||= begin\n t = toplevel_listeners.first\n t.controller ? t.controller : t if t\n end\n end", "def getTop\n return @parent.getTop if @parent\n self\n end", "def top_level\n @top_level ||= begin\n ...
[ "0.69701475", "0.65728956", "0.62990624", "0.62826264", "0.61701125", "0.61248016", "0.61017835", "0.6101533", "0.5940025", "0.5921712", "0.5871211", "0.58548194", "0.5842301", "0.5835246", "0.58233863", "0.5818659", "0.5804262", "0.5764913", "0.5764913", "0.5764913", "0.5764...
0.6613115
2
Upgrades NormalModule +mod+ in +enclosing+ to a +class_type+
def upgrade_to_class mod, class_type, enclosing enclosing.modules_hash.delete mod.name klass = RDoc::ClassModule.from_module class_type, mod klass.store = @store # if it was there, then we keep it even if done_documenting @store.classes_hash[mod.full_name] = klass enclosing.classes_hash[mod.na...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def handle_class_module(var_name, type, class_name, parent, in_module)\n parent_name = @known_classes[parent] || parent\n\n if in_module then\n enclosure = @classes[in_module] || @store.find_c_enclosure(in_module)\n\n if enclosure.nil? and enclosure = @known_classes[in_module] then\n enc_typ...
[ "0.6901349", "0.6312487", "0.6244739", "0.6218127", "0.60096824", "0.60076946", "0.596576", "0.5961346", "0.5915966", "0.5843563", "0.57941985", "0.5731647", "0.5729745", "0.57218474", "0.57025146", "0.5686368", "0.5662105", "0.56227356", "0.56175745", "0.5574898", "0.5509836...
0.78340024
0
Public: Creates a new TomDoc parser. See also RDoc::Markup::parse
def initialize super @section = nil @seen_returns = false end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse(doc)\n parser = parser_class.new\n parser.run(doc)\n end", "def parse!(markup)\n doc(markup)\n end", "def parser\n @parser ||= Parser.new(self)\n end", "def parser\n @parser ||= Parser.new(self)\n end", "def parse(body)\n new Nokogiri body\n end", "d...
[ "0.70522124", "0.69442", "0.6518886", "0.6518886", "0.6471483", "0.6454876", "0.6435915", "0.62993157", "0.62582576", "0.6228901", "0.6228901", "0.6228901", "0.6228901", "0.6228568", "0.62029696", "0.6183688", "0.6178261", "0.6149796", "0.6149796", "0.6147492", "0.6094577", ...
0.0
-1
Internal: Builds a heading from the token stream level The level of heading to create Returns an RDoc::Markup::Heading
def build_heading level heading = super @section = heading.text heading end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def build_heading level\n heading = RDoc::Markup::Heading.new level, text\n skip :NEWLINE\n\n heading\n end", "def build_heading level\n type, text, = get\n\n text = case type\n when :TEXT then\n skip :NEWLINE\n text\n else\n unget\n ...
[ "0.8578955", "0.8406108", "0.7218734", "0.69014573", "0.665747", "0.6557782", "0.6556983", "0.6435466", "0.6331187", "0.6236091", "0.62033635", "0.6189638", "0.6128068", "0.61100584", "0.60587955", "0.6038665", "0.5994101", "0.5863334", "0.5798587", "0.5791657", "0.57793003",...
0.73661107
2