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
Creates a new Stats that will have +num_files+. +verbosity+ defaults to 1 which will create an RDoc::Stats::Normal outputter.
def initialize store, num_files, verbosity = 1 @num_files = num_files @store = store @coverage_level = 0 @doc_items = nil @files_so_far = 0 @fully_documented = false @num_params = 0 @percent_doc = nil @start = Time.now @undoc_params = 0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stats(options={})\n Resources::Stats.new(self, options)\n end", "def initialize(top_level, file_name, body, options, stats)\n @body = body\n @stats = stats\n @options = options\n @top_level = top_level\n @progress = $stderr unless options.quiet\n end", "def file_stats\n\...
[ "0.5072403", "0.49428964", "0.49098304", "0.48870134", "0.48735586", "0.48121276", "0.47664604", "0.47546026", "0.47477186", "0.4733715", "0.47125015", "0.46763608", "0.46491212", "0.46043748", "0.45642227", "0.4549249", "0.451723", "0.45030895", "0.44959903", "0.44905746", "...
0.5679725
0
Records the parsing of an alias +as+.
def add_alias as @display.print_alias as end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def as(alias_name)\n \"#{self} as #{alias_name}\".to_sym\n end", "def as(alias_name)\n \"#{self} as #{alias_name}\".to_sym\n end", "def parse_alias(context, single, tk, comment)\n line_no = tk[:line_no]\n\n skip_tkspace\n\n if :on_lparen === peek_tk[:kind] then\n get_tk\n skip_tkspac...
[ "0.6390422", "0.6390422", "0.6377736", "0.6165928", "0.6111934", "0.6077592", "0.6073227", "0.6031466", "0.60066193", "0.5911214", "0.58737516", "0.58737516", "0.58617973", "0.5808276", "0.58026236", "0.58000594", "0.57929057", "0.57929057", "0.5773102", "0.5759095", "0.57523...
0.70595706
0
Records the parsing of an attribute +attribute+
def add_attribute attribute @display.print_attribute attribute end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse_attribute\n trace = @lexer.trace\n\n ns = nil\n name = parse_text\n return terminate trace if not name\n\n if @lexer.get and @lexer.get.type == :colon\n @lexer.next!\n ns = name\n name = parse_text\n ...
[ "0.6707461", "0.6600154", "0.63197106", "0.6178045", "0.6164499", "0.61449015", "0.6064382", "0.60453355", "0.60453355", "0.60304105", "0.5992456", "0.5968762", "0.59441733", "0.5892319", "0.5888241", "0.5874782", "0.586144", "0.5841703", "0.58200264", "0.5792548", "0.5755729...
0.5803169
19
Records the parsing of a class +klass+
def add_class klass @display.print_class klass end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse(klass)\n Parser.new(self, klass).result\n end", "def parse_class(klass, path)\n methods = find_class_methods(klass)\n elements = parse_methods(methods, path)\n end", "def klass=(klass)\n if klass.class == String\n # XXX sth like klass.split(/,/) and remove whitespace\...
[ "0.64864665", "0.63203496", "0.6214779", "0.60588026", "0.59694076", "0.59500694", "0.5928769", "0.5910366", "0.590582", "0.5876749", "0.585676", "0.5843803", "0.5809906", "0.58076066", "0.57233506", "0.5711923", "0.5699024", "0.56982106", "0.5687024", "0.5663767", "0.5651051...
0.57709616
14
Records the parsing of +constant+
def add_constant constant @display.print_constant constant end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def on_const(token)\n log \"CONST: '#{token}'\"\n\n l_token = Tailor::Lexer::Token.new(token)\n lexed_line = LexedLine.new(super, lineno)\n const_changed\n notify_const_observers(l_token, lexed_line, lineno, column)\n\n super(token)\n end", "def parse_constant\n case current\n...
[ "0.65419286", "0.6395401", "0.631225", "0.6157065", "0.611044", "0.59868324", "0.59665084", "0.5950843", "0.5830246", "0.5684781", "0.5628198", "0.55917937", "0.5581623", "0.557081", "0.55677456", "0.5543955", "0.5528128", "0.54877967", "0.5435793", "0.54336005", "0.53873014"...
0.59221077
8
Records the parsing of +file+
def add_file(file) @files_so_far += 1 @display.print_file @files_so_far, file end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse(file)\n puts \"Not yet implemented\"\nend", "def parse_file(filename); end", "def parse\n parse_file\n self\n end", "def parse_file\n filename = full_path_from_edict_file(@config[\"filename\"])\n ### Get all the line into memory\n file_obj = File.new(filename, \"r\")\n ...
[ "0.675066", "0.66000295", "0.6595588", "0.63877845", "0.63003635", "0.6288569", "0.61512446", "0.614471", "0.60912836", "0.6079631", "0.6061798", "0.59785116", "0.59671575", "0.59492517", "0.59422684", "0.59418976", "0.5923358", "0.59217346", "0.58737147", "0.5868843", "0.585...
0.0
-1
Records the parsing of +method+
def add_method(method) @display.print_method method end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parsed_methods\n parsed_include(:method)\n end", "def parse_method_call(line)\n method, string = line.match(/^\\s*([a-z0-9_\\[\\]]+)(.*)/)[1..2]\n raise \"no method found\" unless method\n\n start_new_translation if method == 'msgid' and translation_complete?\n @last_method = method.t...
[ "0.6888021", "0.67337465", "0.67337465", "0.64455724", "0.6399562", "0.6211571", "0.6203529", "0.6178963", "0.6178963", "0.6178963", "0.6178963", "0.6178963", "0.6178963", "0.6178963", "0.6178963", "0.6178963", "0.6178963", "0.6178963", "0.6178963", "0.6050258", "0.6008432", ...
0.5425924
85
Records the parsing of a module +mod+
def add_module(mod) @display.print_module mod end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dump_module(mod)\n # Module / Class declaration\n modulename = mod.name.sub(/^#{@nesting}\\:\\:/, \"\")\n # Class\n if mod.is_a?(Class)\n superclass = mod.superclass\n superclass = (!superclass.nil? && superclass != Object) ? \" < \"+superclass.name : \"\"\n add_line(\"class #{module...
[ "0.638808", "0.6156591", "0.6150731", "0.5801933", "0.57898444", "0.57843775", "0.5764621", "0.571861", "0.56193316", "0.56097883", "0.5527871", "0.5510369", "0.5498181", "0.54870296", "0.5387548", "0.5344652", "0.5342396", "0.53290325", "0.53053486", "0.5263542", "0.52470994...
0.5927208
3
Call this to mark the beginning of parsing for display purposes
def begin_adding @display.begin_adding end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def start_of_line\n self.cursor = 0\n end", "def parserDidStartDocument(parser)\n puts \"starting parsing..\"\n end", "def lex_start; end", "def lex_start; end", "def lex_start; end", "def lex_start; end", "def initialize start_string=nil\n\t\t@main = flow width: 980, margin_left: 10\n\t\td...
[ "0.63144916", "0.6257732", "0.5876431", "0.5876431", "0.5876431", "0.5876431", "0.58262736", "0.5784555", "0.57653105", "0.57355183", "0.573398", "0.573398", "0.573398", "0.573398", "0.573398", "0.573398", "0.573398", "0.573398", "0.573398", "0.573398", "0.57125777", "0.569...
0.0
-1
Calculates documentation totals and percentages for classes, modules, constants, attributes and methods.
def calculate return if @doc_items ucm = @store.unique_classes_and_modules classes = @store.unique_classes.reject { |cm| cm.full_name == 'Object' } constants = [] ucm.each { |cm| constants.concat cm.constants } methods = [] ucm.each { |cm| methods.concat cm.method_list } attributes ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def total_documented\n @methods.select {|b| b}.length +\n @classes.select {|b| b}.length +\n @modules.select {|b| b}.length +\n @attrs.select {|b| b}.length +\n @constants.select {|b| b}.length\n end", "def summary\n calculate\n\n num_width = [@num_files, @num_items].max.to_s.le...
[ "0.70642203", "0.6944603", "0.6936234", "0.6546581", "0.6435027", "0.6309621", "0.58472264", "0.58408594", "0.5748491", "0.5686568", "0.5640664", "0.56168187", "0.56055987", "0.5595124", "0.5569914", "0.55628484", "0.55235595", "0.5521297", "0.55099905", "0.54873127", "0.5486...
0.73639095
0
Sets coverage report level. Accepted values are: false or nil:: No report 0:: Classes, modules, constants, attributes, methods 1:: Level 0 + method parameters
def coverage_level= level level = -1 unless level @coverage_level = level end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def level=(level)\n @level = level\n @implementation.level = @level if @implementation\n level\n end", "def level=( level )\n super(level || 0)\n end", "def level=(value)\n @level = value\n end", "def level=(value)\n @level = value\n ...
[ "0.6102872", "0.58556205", "0.5751274", "0.5751274", "0.57291365", "0.5697992", "0.56683844", "0.5567738", "0.5515754", "0.5515754", "0.53983444", "0.5389334", "0.53297514", "0.53205323", "0.5288798", "0.52746207", "0.52733415", "0.5241176", "0.5213715", "0.51974356", "0.5165...
0.78778565
0
Returns the length and number of undocumented items in +collection+.
def doc_stats collection visible = collection.select { |item| item.display? } [visible.length, visible.count { |item| not item.documented? }] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def item_count\n @collection.length\n end", "def item_count\n collection.length\n end", "def item_count\n @collection.size\n end", "def length\n collection.size\n end", "def item_count\n @collection.count\n end", "def size\n @collection.size\n end", "def number_of_elemen...
[ "0.7824676", "0.78221303", "0.76452434", "0.751757", "0.74176955", "0.722334", "0.7197508", "0.71069545", "0.7015044", "0.6911633", "0.68647796", "0.6795123", "0.6795123", "0.6784758", "0.6784758", "0.6784758", "0.6784758", "0.6784758", "0.6784758", "0.6784758", "0.6768686", ...
0.74309194
4
Call this to mark the end of parsing for display purposes
def done_adding @display.done_adding end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def close\n @parser.data ''\n @closed = true\n end", "def endline\n\t\t@@bold = @@objs = false\n\tend", "def end_line(kind); end", "def done\n # Parse not successful and no reason identified\n # Assuming that parse failed because of a premature end\n premature_en...
[ "0.6501578", "0.64615345", "0.6389059", "0.6362828", "0.6334022", "0.6334022", "0.62359464", "0.6226473", "0.6199513", "0.61583036", "0.61321485", "0.61321485", "0.6122091", "0.5992481", "0.5992481", "0.5992481", "0.5992481", "0.59662676", "0.594881", "0.59182286", "0.5908932...
0.0
-1
The documentation status of this project. +true+ when 100%, +false+ when less than 100% and +nil+ when unknown. Set by calling calculate
def fully_documented? @fully_documented end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_status\n inds = self.indicators\n if inds.size == 0\n self.status=0.0\n else\n status = 0.0\n inds.each do |indicator|\n status += indicator.contributing_projects_status\n end\n self.status = status / inds.size\n end\n end", "def status\n\t\t\t\ttrue\n\t\t\...
[ "0.6135637", "0.5984547", "0.59778017", "0.58668524", "0.5831318", "0.5796713", "0.5794642", "0.5773622", "0.5716209", "0.5668741", "0.5640362", "0.5640306", "0.56362414", "0.56121004", "0.5575697", "0.55740905", "0.5538026", "0.5527328", "0.5518547", "0.5512707", "0.5510809"...
0.5795132
6
A report that says you did a great job!
def great_job report = RDoc::Markup::Document.new report << RDoc::Markup::Paragraph.new('100% documentation!') report << RDoc::Markup::Paragraph.new('Great Job!') report end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def report; end", "def report; end", "def report; end", "def report; end", "def report; end", "def report\n puts \"Hello! My name is #{@name}, I've delivered #{@experience} papers\n today and I've earned $#{@earnings} so far!\"\n end", "def report_moab_jobs\n self.report('moab_jobs_report')\n...
[ "0.6876497", "0.6876497", "0.6876497", "0.6876497", "0.6876497", "0.6835297", "0.66366786", "0.66269964", "0.6601509", "0.64556503", "0.6435709", "0.6426795", "0.6389304", "0.6380626", "0.63077766", "0.62945384", "0.61963725", "0.61963725", "0.61959165", "0.61959165", "0.6166...
0.6834137
6
Calculates the percentage of items documented.
def percent_doc return @percent_doc if @percent_doc @fully_documented = (@num_items - @doc_items) == 0 @percent_doc = @doc_items.to_f / @num_items * 100 if @num_items.nonzero? @percent_doc ||= 0 @percent_doc end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def score\n documented = @files.inject(0) {|sum, file| sum += file.total_documented }\n total = @files.inject(0) {|sum, file| sum += file.total_entities }\n ((documented.to_f / total) * 100).to_i\n end", "def score\n total = 0\n docs = 0\n [@classes, @modules, @methods, @constants, @attr...
[ "0.7451055", "0.7181133", "0.69565874", "0.69389296", "0.6715942", "0.66024226", "0.6488005", "0.64565504", "0.64512104", "0.6378662", "0.6338842", "0.62609464", "0.62487787", "0.6239315", "0.62367386", "0.6217376", "0.6207395", "0.6203071", "0.61856353", "0.61506814", "0.613...
0.8586166
0
Returns a report on which items are not documented
def report if @coverage_level > 0 then extend RDoc::Text end if @coverage_level.zero? then calculate return great_job if @num_items == @doc_items end ucm = @store.unique_classes_and_modules report = RDoc::Markup::Document.new report << RDoc::Markup::Paragraph.new('The f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def print_undocumented_objects; end", "def get_policy_non_compliance_metadata()\n return MicrosoftGraph::DeviceManagement::Reports::GetPolicyNonComplianceMetadata::GetPolicyNonComplianceMetadataRequestBuilder.new(@path_parameters, @request_adapter)\n end", "def not_delivered\n...
[ "0.59380436", "0.57731634", "0.57404375", "0.5690828", "0.5675917", "0.565073", "0.5643285", "0.56374013", "0.5636086", "0.5612642", "0.5602124", "0.55812943", "0.55552477", "0.5524425", "0.55117506", "0.5509889", "0.55073106", "0.54664284", "0.54642946", "0.54603046", "0.545...
0.62528986
0
Returns a report on undocumented attributes in ClassModule +cm+
def report_attributes cm return if cm.attributes.empty? report = [] cm.each_attribute do |attr| next if attr.documented? line = attr.line ? ":#{attr.line}" : nil report << " #{attr.definition} :#{attr.name} # in file #{attr.file.full_name}#{line}\n" report << "\n" end rep...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def report_class_module cm\n return if cm.fully_documented? and @coverage_level.zero?\n return unless cm.display?\n\n report = RDoc::Markup::Document.new\n\n if cm.in_files.empty? then\n report << RDoc::Markup::Paragraph.new(\"#{cm.definition} is referenced but empty.\")\n report << RDoc::Mar...
[ "0.6134386", "0.6119551", "0.59977823", "0.5958396", "0.59551984", "0.5924578", "0.584162", "0.5755799", "0.5755799", "0.5755799", "0.57055396", "0.5695141", "0.5491866", "0.54147816", "0.5372744", "0.5356944", "0.53274643", "0.53274643", "0.53274643", "0.53274643", "0.532746...
0.80873084
0
Returns a report on undocumented items in ClassModule +cm+
def report_class_module cm return if cm.fully_documented? and @coverage_level.zero? return unless cm.display? report = RDoc::Markup::Document.new if cm.in_files.empty? then report << RDoc::Markup::Paragraph.new("#{cm.definition} is referenced but empty.") report << RDoc::Markup::Paragraph....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def report_attributes cm\n return if cm.attributes.empty?\n\n report = []\n\n cm.each_attribute do |attr|\n next if attr.documented?\n line = attr.line ? \":#{attr.line}\" : nil\n report << \" #{attr.definition} :#{attr.name} # in file #{attr.file.full_name}#{line}\\n\"\n report << \"...
[ "0.6440941", "0.6403342", "0.62331694", "0.6204828", "0.5406286", "0.5283794", "0.51656467", "0.5153227", "0.495127", "0.49421266", "0.4909367", "0.4896943", "0.48723465", "0.48492816", "0.4835266", "0.4815233", "0.4774819", "0.4774819", "0.4774819", "0.4774819", "0.4736227",...
0.71419346
0
Returns a report on undocumented constants in ClassModule +cm+
def report_constants cm return if cm.constants.empty? report = [] cm.each_constant do |constant| # TODO constant aliases are listed in the summary but not reported # figure out what to do here next if constant.documented? || constant.is_alias_for line = constant.line ? ":#{constan...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def report_class_module cm\n return if cm.fully_documented? and @coverage_level.zero?\n return unless cm.display?\n\n report = RDoc::Markup::Document.new\n\n if cm.in_files.empty? then\n report << RDoc::Markup::Paragraph.new(\"#{cm.definition} is referenced but empty.\")\n report << RDoc::Mar...
[ "0.6258148", "0.62573165", "0.61953163", "0.61208963", "0.60942477", "0.59488976", "0.59270394", "0.58496827", "0.58480734", "0.57535464", "0.5713233", "0.5639817", "0.56213576", "0.55629987", "0.55566514", "0.55566514", "0.54819685", "0.5452295", "0.54406995", "0.5434758", "...
0.81759745
0
Returns a report on undocumented methods in ClassModule +cm+
def report_methods cm return if cm.method_list.empty? report = [] cm.each_method do |method| next if method.documented? and @coverage_level.zero? if @coverage_level > 0 then params, undoc = undoc_params method @num_params += params unless undoc.empty? then ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def report_class_module cm\n return if cm.fully_documented? and @coverage_level.zero?\n return unless cm.display?\n\n report = RDoc::Markup::Document.new\n\n if cm.in_files.empty? then\n report << RDoc::Markup::Paragraph.new(\"#{cm.definition} is referenced but empty.\")\n report << RDoc::Mar...
[ "0.7351219", "0.61214334", "0.6070575", "0.5992931", "0.58964187", "0.58757263", "0.57293224", "0.56939024", "0.5656353", "0.5631042", "0.54740834", "0.54549617", "0.54494405", "0.54061687", "0.54061687", "0.54061687", "0.54061687", "0.53986835", "0.53926826", "0.5384897", "0...
0.7697169
0
Returns a summary of the collected statistics.
def summary calculate num_width = [@num_files, @num_items].max.to_s.length undoc_width = [ @undoc_attributes, @undoc_classes, @undoc_constants, @undoc_items, @undoc_methods, @undoc_modules, @undoc_params, ].max.to_s.length report = RDoc::Markup::Verbatim.n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def summary\n stats = Hash.new { |h,k| h[k] = {} }\n @stats.each do |field, actions|\n actions.each do |action|\n col = action.column_name\n ## register the value of this \"stats\" for the column name\n action.iterate do ...
[ "0.757262", "0.7478962", "0.74286693", "0.74243253", "0.7362877", "0.7295584", "0.72898185", "0.72476995", "0.72398436", "0.72198087", "0.71923816", "0.7191851", "0.71852505", "0.7158869", "0.7158869", "0.715226", "0.715226", "0.7137247", "0.71348053", "0.71348053", "0.713480...
0.0
-1
Determines which parameters in +method+ were not documented. Returns a total parameter count and an Array of undocumented methods.
def undoc_params method @formatter ||= RDoc::Markup::ToTtOnly.new params = method.param_list params = params.map { |param| param.gsub(/^\*\*?/, '') } return 0, [] if params.empty? document = parse method.comment tts = document.accept @formatter undoc = params - tts [params.length,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def method_signature(method)\n help = method_help(method)\n params = []\n ret = nil\n help.each_line do |l|\n case l \n when /@param[\\s\\w]+\\[(\\w+).*\\]/\n params << $1.downcase\n when /@return[\\s\\w]+\\[(\\w+).*\\]/\n ret = $1.downca...
[ "0.6288515", "0.6281374", "0.6007442", "0.5922647", "0.5878092", "0.58698916", "0.5825764", "0.5668209", "0.56604", "0.55910987", "0.5590665", "0.5572324", "0.55474377", "0.55377024", "0.5500631", "0.54738086", "0.54233086", "0.54191107", "0.53770506", "0.5347707", "0.5342467...
0.6499959
0
Prints a file with a progress bar
def print_file files_so_far, filename progress_bar = sprintf("%3d%% [%2d/%2d] ", 100 * files_so_far / @num_files, files_so_far, @num_files) if $stdout.tty? # Print a progress bar, but make sure it fits on a single line. Fil...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def progress(size, file)\n\t\tprint '.'\n\t\tsleep 1.5\n\t\tprint '.'\n\t\tsleep 1.5\n\t\tprint '.'\n\t\tsleep 1.5\n\t\tpercent = (File.size? file).to_f / size.to_f\n\t\tpercent = percent * 100\n\t\tpercent = ((percent*20).round / 20.0)\n\t\tprint \"\\e[1;37m#{percent}\\e[0m%\"\n\tend", "def print_progress_bar_...
[ "0.7620527", "0.69731754", "0.68440044", "0.66921574", "0.6493763", "0.6463705", "0.64099485", "0.640856", "0.6375138", "0.6232864", "0.62238574", "0.61909336", "0.61909336", "0.61909336", "0.61909336", "0.61909336", "0.6172585", "0.61551493", "0.6112006", "0.61019224", "0.60...
0.73306894
1
Prints a message at the beginning of parsing
def begin_adding(*) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def user_message_begin(msg)\n user_message(msg, 0, \">>>\")\n end", "def debug_message_begin(msg)\n debug_message(msg, 0, \">>>\")\n end", "def print(message); end", "def print(message); end", "def print!\n # -> uncomment the next line to manually enable rule tracing\n # t...
[ "0.6862456", "0.68404764", "0.6235034", "0.6235034", "0.61993116", "0.61961794", "0.61678547", "0.61512583", "0.6021848", "0.6010096", "0.6000498", "0.59901386", "0.59781253", "0.59562296", "0.59487766", "0.59361845", "0.5908082", "0.59026563", "0.5900441", "0.588472", "0.586...
0.0
-1
Prints when an alias is added
def print_alias(*) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_alias as\n @display.print_alias as\n end", "def showAlias\n puts \"showAlias.\"\nend", "def add_alias(event)\n assert_permissions(event) # Only the botmaster can execute this\n\n msg = event.content\n aka = parse_term(msg)\n raise OutteError.new \"You need to provide an alias in quotes.\" if a...
[ "0.7809194", "0.730717", "0.69368523", "0.6865145", "0.65504587", "0.65181625", "0.65181625", "0.65181625", "0.6515405", "0.6470773", "0.64335555", "0.6420074", "0.6390257", "0.6368347", "0.6364243", "0.6344595", "0.6339636", "0.63308805", "0.63308805", "0.6286932", "0.627178...
0.8080943
0
Prints when an attribute is added
def print_attribute(*) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_attribute attribute\n @display.print_attribute attribute\n end", "def add_attribute(name, &block); end", "def attribute(name); end", "def print_attribute(name, value, threshold)\n out = ''\n if value.is_a?(Yarpler::Models::Relation)\n out << threshold + ',\"' + name + '\": ...
[ "0.7988103", "0.66646695", "0.6653352", "0.65758", "0.6560205", "0.6555004", "0.65288657", "0.65166396", "0.64682424", "0.64682424", "0.64682424", "0.64682424", "0.64682424", "0.64682424", "0.64682424", "0.646139", "0.6353915", "0.61859906", "0.61859906", "0.61859906", "0.618...
0.7858012
1
Prints when a class is added
def print_class(*) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_class klass\n @display.print_class klass\n end", "def append_class(name); end", "def append_class(name); end", "def add_class(name); end", "def add_class(name); end", "def display_class_info\n end", "def print_class\n\n puts \"* #{name.capitalize} *\".colorize(:light_green).bold.indent(...
[ "0.77309835", "0.6856082", "0.6856082", "0.68064654", "0.68064654", "0.6759204", "0.6481245", "0.645793", "0.6336139", "0.6313656", "0.6221699", "0.6190082", "0.6148822", "0.60994023", "0.60731554", "0.60562634", "0.60093075", "0.6002924", "0.60020244", "0.5989492", "0.595264...
0.68307376
3
Prints when a constant is added
def print_constant(*) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_constant constant\n @display.print_constant constant\n end", "def const(name, value)\n @data << \"#{name}\\tequ #{value}\"\n end", "def constants() end", "def dump_constants(io)\n @constants.each do |name, constant|\n name = [@prefix, name].join '.' if @prefix\n io...
[ "0.81951785", "0.6236507", "0.6015457", "0.5898099", "0.58784384", "0.58784384", "0.58766717", "0.5837733", "0.5837733", "0.5830289", "0.5772491", "0.57440436", "0.57358027", "0.5724494", "0.56932867", "0.5683045", "0.56540334", "0.56165063", "0.5595688", "0.5595688", "0.5592...
0.7619029
1
Prints when a file is added
def print_file(*) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_file(file)\n @files_so_far += 1\n @display.print_file @files_so_far, file\n end", "def add_file(path, *args)\n puts \"#{@indent}#{basename(path)}#{id(path)}\"\n end", "def add(filename)\n not_implemented('add')\n end", "def new_files; end", "def print\n if exists?\n ...
[ "0.75395507", "0.6957859", "0.6451845", "0.6440185", "0.63540256", "0.6343527", "0.6233211", "0.62232554", "0.62065595", "0.62065595", "0.61851627", "0.61775535", "0.6169182", "0.61375797", "0.6132778", "0.6130885", "0.6060284", "0.6011403", "0.59640837", "0.5956816", "0.5917...
0.6088446
16
Prints when a method is added
def print_method(*) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_method(method)\n @display.print_method method\n end", "def method_added(name); end", "def method_added(name); end", "def method_added(*) end", "def display_method_info\n end", "def print\n\t\tputs name + \" \" + className + \" says \" + call\n\tend", "def display_method_list\n end", "de...
[ "0.7969524", "0.7344711", "0.7344711", "0.7229653", "0.71020544", "0.68560195", "0.6841742", "0.6827921", "0.66903543", "0.6683944", "0.6652214", "0.6652214", "0.6610944", "0.65746456", "0.6502503", "0.64983267", "0.64832896", "0.6451226", "0.6451226", "0.64437485", "0.642588...
0.7475421
1
Prints when a module is added
def print_module(*) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_module(mod)\n @display.print_module mod\n end", "def start_new_module\n event_display(\"Your class started a new module!\\n All the new material is so overwhelming...\\n Will you ever learn it all?\")\n group_event_hash_creator({technical_skills: -1})\n end", "def method_missing(method, *arg...
[ "0.7843731", "0.621833", "0.61851084", "0.6134418", "0.60388625", "0.6017838", "0.6012653", "0.59994906", "0.5925428", "0.59100145", "0.5875591", "0.5756261", "0.56996614", "0.5696552", "0.5696552", "0.5696552", "0.56777555", "0.5662601", "0.5644089", "0.5640058", "0.56093323...
0.7160942
1
Prints when RDoc is done
def done_adding(*) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def on_end_document\n STDOUT << \"on_end_document\\n\"\n STDOUT.flush\n end", "def ending\n if File.exist?('CREDITS.md')\n @io.puts IO.read('CREDITS.md')\n @io.puts\n end\n\n if File.exist?('AUTHORS.md')\n @io.puts IO.read('AUTHORS.md')\n ...
[ "0.6871987", "0.6852863", "0.68474305", "0.68474305", "0.6592763", "0.6493764", "0.64805865", "0.64625514", "0.6395169", "0.6382988", "0.6371327", "0.6334831", "0.6334831", "0.6334831", "0.6334831", "0.63222796", "0.6322074", "0.6271591", "0.6254204", "0.62521315", "0.6175051...
0.0
-1
Prepares for parsing +str+. If you define a custom initialize you must call this method before parse
def setup_parser(str, debug=false) set_string str, 0 @memoizations = Hash.new { |h,k| h[k] = {} } @result = nil @failed_rule = nil @failing_rule_offset = -1 @line_offsets = nil setup_foreign_grammar end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize(str = nil)\n parse(str) if str\n end", "def initialize(str)\n @raw = str # Keeps th original string for later use\n @buffer = StringScanner.new(str) # Create StringScanner buffer\n @attributes = {} # Initialize the attributes...
[ "0.80790573", "0.800447", "0.7447544", "0.7447544", "0.7447544", "0.72659373", "0.71864367", "0.699378", "0.6980812", "0.6937536", "0.6937536", "0.6937536", "0.6937536", "0.69348913", "0.68966824", "0.6893871", "0.6871667", "0.6826292", "0.6826292", "0.6817147", "0.67797303",...
0.63198274
52
Sets the string and current parsing position for the parser.
def set_string string, pos @string = string @string_size = string ? string.size : 0 @pos = pos end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_string string, pos\n @string = string\n @string_size = string ? string.size : 0\n @pos = pos\n @position_line_offsets = nil\n end", "def pos=(n)\n n += @string.length if n.negative?\n raise RangeError, \"index out of range\" if n.negative?\n raise RangeError, \"index out o...
[ "0.751787", "0.64531726", "0.63920784", "0.6257828", "0.6257828", "0.62034255", "0.6065973", "0.602774", "0.58982104", "0.5875002", "0.5867286", "0.58068085", "0.57819635", "0.5768482", "0.5765891", "0.5754783", "0.5746028", "0.5724649", "0.5724649", "0.57238877", "0.56699514...
0.73816484
2
Instructs +compiler+ how to write to +io_variable+
def set_eoutvar compiler, io_variable compiler.put_cmd = "#{io_variable}.write" compiler.insert_cmd = "#{io_variable}.write" compiler.pre_cmd = [] compiler.post_cmd = [] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def write; @my_var = 2; end", "def setio(input, output)\n @@input = input\n @@output = output\n end", "def write(value)\n # pass\n end", "def write!(value = true)\n @write = value\n end", "def write_to(io)\n end", "def write_to(io)\n end", "def data=(value)\r\n @ob...
[ "0.6582941", "0.61969495", "0.60529315", "0.6003975", "0.5901625", "0.5901625", "0.5834148", "0.58034474", "0.5782879", "0.5770628", "0.57504123", "0.5682807", "0.5682807", "0.56779313", "0.56779313", "0.5659719", "0.56520754", "0.56461424", "0.56338024", "0.5632404", "0.5616...
0.8158815
0
The definition of this singleton class, class
def definition "class << #{full_name}" end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _singleton_class\n class << self\n self\n end\n end", "def class() end", "def singleton_class\n class << self; self; end\n end", "def singleton_class\n\t\tclass << self; self; end\n\tend", "def class; end", "def class; end", "def singleton_class\r\n class<<self;...
[ "0.765664", "0.7582659", "0.75365096", "0.75224423", "0.73645216", "0.73645216", "0.73210096", "0.70896965", "0.7035108", "0.7035108", "0.7013823", "0.6998507", "0.6998507", "0.6998507", "0.6998507", "0.6998507", "0.6998507", "0.6998347", "0.6998347", "0.6951014", "0.6864273"...
0.6208474
48
Creates a new CodeObject that will document itself and its children
def initialize @metadata = {} @comment = '' @parent = nil @parent_name = nil # for loading @parent_class = nil # for loading @section = nil @section_title = nil # for loading @file = nil @full_name = nil @store ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def code_tree\n kids = j_instance.getChildren\n\n kids.each_with_object([]) do |kid, acc|\n data = { type: kid.getType, parent_type: j_instance.getType, token: kid.toString }\n subtree = self.class.new(kid).code_tree\n data[:children] = subtree unless subtree.empty?\n acc << d...
[ "0.6275597", "0.6147853", "0.6012986", "0.5846586", "0.5835026", "0.5677205", "0.5620631", "0.56184644", "0.5615051", "0.56147933", "0.5587613", "0.5559381", "0.55262357", "0.5514716", "0.54836386", "0.5480263", "0.5469652", "0.5466705", "0.5461026", "0.5405502", "0.53899366"...
0.0
-1
Initializes state for visibility of this CodeObject and its children.
def initialize_visibility # :nodoc: @document_children = true @document_self = true @done_documenting = false @force_documentation = false @received_nodoc = false @ignored = false @suppressed = false @track_visibility = true end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize\r\n clear\r\n @visible = false\r\n end", "def init_visibility\n return if actor? && !@battler.data_battler.dead_key.empty?\n @battler_visible = !@battler.hidden? && (@battler.enemy? ? \n !@battler.collapsed : true)\n self.opacity = 0 unless @battler_visible\n end", "def ini...
[ "0.60771346", "0.5579505", "0.55269986", "0.53581095", "0.5357665", "0.5357665", "0.5325082", "0.5325082", "0.5325082", "0.5325082", "0.5325082", "0.52803713", "0.5252773", "0.52427316", "0.5230637", "0.5223495", "0.521382", "0.52030873", "0.51995164", "0.519853", "0.5183869"...
0.65499294
0
Replaces our comment with +comment+, unless it is empty.
def comment=(comment) @comment = case comment when NilClass then '' when RDoc::Markup::Document then comment when RDoc::Comment then comment.normalize else if comment and not comment.empty? then no...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def comment!(comment = nil)\n mutate(:comment, comment)\n end", "def clear_comment\n @comment = ''\n end", "def del_comment\n @comment = ''\n end", "def clear_comment\n @comment = nil\n end", "def set_comment(comment)\n return unless comment\n\n if comment =~ /^#[ \\t]...
[ "0.77293473", "0.7599705", "0.7232814", "0.71379787", "0.70955336", "0.6984211", "0.68913305", "0.6773488", "0.667448", "0.66611606", "0.66123676", "0.65792936", "0.6560442", "0.6560442", "0.6516591", "0.64896244", "0.6417038", "0.6417038", "0.6417038", "0.6417038", "0.639016...
0.65426856
14
Should this CodeObject be displayed in output? A code object should be displayed if: The item didn't have a nodoc or wasn't in a container that had nodoc The item wasn't ignored The item has documentation and was not suppressed
def display? @document_self and not @ignored and (documented? or not @suppressed) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def print_undocumented_objects; end", "def nodoc\n @hide_commands_without_desc and description.nil?\n end", "def content_for(code_object)\n Code.new(render_doc_markup_for(code_object),\n start_line_for(code_object), :text).\n with_line_numbers(use_line_numbers?).to_s\n end"...
[ "0.5971103", "0.5970823", "0.58829015", "0.5687775", "0.5408857", "0.536707", "0.5333616", "0.5325066", "0.53208387", "0.5290401", "0.52506685", "0.52472234", "0.5243005", "0.52386117", "0.5238551", "0.52344483", "0.51798075", "0.51204467", "0.5108495", "0.51057166", "0.50952...
0.5982703
0
Enables or disables documentation of this CodeObject's children unless it has been turned off by :enddoc:
def document_children=(document_children) return unless @track_visibility @document_children = document_children unless @done_documenting end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_from_documentation?\n @remove_from_documentation ||=\n @received_nodoc &&\n !any_content(false) &&\n @includes.all? { |i| !i.module.is_a?(String) && i.module.remove_from_documentation? } &&\n classes_and_modules.all? { |cm| cm.remove_from_documentation? }\n end", "def stop_doc\...
[ "0.61956495", "0.6091728", "0.60094255", "0.5891551", "0.5716438", "0.55365413", "0.5516605", "0.55060714", "0.5490435", "0.54615295", "0.5443349", "0.54244524", "0.53485304", "0.5342761", "0.5341765", "0.5336401", "0.532978", "0.5326034", "0.53168833", "0.5265082", "0.525097...
0.58745885
4
Enables or disables documentation of this CodeObject unless it has been turned off by :enddoc:. If the argument is +nil+ it means the documentation is turned off by +:nodoc:+.
def document_self=(document_self) return unless @track_visibility return if @done_documenting @document_self = document_self @received_nodoc = true if document_self.nil? end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hide_docs(command)\n def command.nodoc; true end\n end", "def force_documentation=(value)\n @force_documentation = value unless @done_documenting\n end", "def remove_from_documentation?\n @remove_from_documentation ||=\n @received_nodoc &&\n !any_content(false) &&\n @inclu...
[ "0.70783544", "0.7017928", "0.67614156", "0.6734596", "0.6402231", "0.6336051", "0.6335695", "0.6305939", "0.62974477", "0.6095689", "0.6041289", "0.60214734", "0.60214734", "0.60214734", "0.60214734", "0.60202545", "0.60175234", "0.5945361", "0.5929098", "0.58784467", "0.587...
0.5437705
49
Does this object have a comment with content or is received_nodoc true?
def documented? @received_nodoc or !@comment.empty? end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def documented?\n return true if @received_nodoc\n return false if @comment_location.empty?\n @comment_location.any? { |comment, _| not comment.empty? }\n end", "def nodoc_comment?(node, require_all: T.unsafe(nil)); end", "def comment?\n @contents[0] == :comment\n end", "def nodoc_comme...
[ "0.7260206", "0.7137863", "0.69721186", "0.6952734", "0.6822962", "0.67114675", "0.67114675", "0.66587776", "0.66561276", "0.6509868", "0.6481603", "0.63556266", "0.63526934", "0.63454515", "0.62813795", "0.62308246", "0.62256145", "0.62049705", "0.61850315", "0.6165571", "0....
0.8129934
0
Turns documentation on/off, and turns on/off document_self and document_children. Once documentation has been turned off (by +:enddoc:+), the object will refuse to turn document_self or document_children on, so +:doc:+ and +:start_doc:+ directives will have no effect in the current file.
def done_documenting=(value) return unless @track_visibility @done_documenting = value @document_self = !value @document_children = @document_self end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def start_doc\n return if @done_documenting\n\n @document_self = true\n @document_children = true\n @ignored = false\n @suppressed = false\n end", "def no_doc!\n @controller.doc = false\n end", "def stop_doc\n return unless @track_visibility\n\n @document_self = false\n ...
[ "0.7393557", "0.68753165", "0.6848143", "0.6732677", "0.6155952", "0.61421543", "0.6108455", "0.6047859", "0.60462105", "0.6043676", "0.5997838", "0.5962327", "0.5955557", "0.5916441", "0.5886938", "0.5817501", "0.5800465", "0.57782567", "0.5754427", "0.5739288", "0.57242626"...
0.5893431
14
Yields each parent of this CodeObject. See also RDoc::ClassModuleeach_ancestor
def each_parent code_object = self while code_object = code_object.parent do yield code_object end self end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def each_ancestor # :nodoc:\n end", "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 parents\n unless @parents\n @parents = []\n object = se...
[ "0.74811554", "0.70080596", "0.69221437", "0.68597215", "0.6664155", "0.65896493", "0.65761983", "0.65132815", "0.645982", "0.64368385", "0.6424822", "0.64128256", "0.6386326", "0.6382731", "0.6364563", "0.6356674", "0.63384664", "0.6295122", "0.6269905", "0.6251466", "0.6251...
0.82374334
0
File name where this CodeObject was found. See also RDoc::Contextin_files
def file_name return unless @file @file.absolute_name end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def file_name\n object_file_name\n end", "def filename\n # just checking the first file (which is the file where an object\n # is first declared)\n files.first\n end", "def filename()\n #This is a stub, used for indexing\n end", "def object_name...
[ "0.69929683", "0.69778585", "0.6972382", "0.6964129", "0.6862553", "0.6812254", "0.6798292", "0.66581196", "0.66180265", "0.6603383", "0.65986705", "0.65942585", "0.65767515", "0.65613526", "0.6500344", "0.6468621", "0.6468621", "0.6457483", "0.64340985", "0.64289623", "0.641...
0.6056897
66
Force the documentation of this object unless documentation has been turned off by :enddoc: HACK untested, was assigning to an ivar
def force_documentation=(value) @force_documentation = value unless @done_documenting end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def no_doc!\n @controller.doc = false\n end", "def doc; end", "def doc; end", "def doc; end", "def doc; end", "def docs; end", "def link_documentation; end", "def hide_docs(command)\n def command.nodoc; true end\n end", "def fully_documented?\n @fully_documented\n end", ...
[ "0.7447811", "0.7239296", "0.7239296", "0.7239296", "0.7239296", "0.69040364", "0.6770337", "0.67692524", "0.6752066", "0.67491907", "0.66965574", "0.6636588", "0.6636588", "0.6608852", "0.6608852", "0.6608852", "0.65292495", "0.64919674", "0.6481706", "0.6481706", "0.6471573...
0.80899626
0
Sets the full_name overriding any computed full name. Set to +nil+ to clear RDoc's cached value
def full_name= full_name @full_name = full_name end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def full_name\n @full_name ||= calculate_full_name\n end", "def full_name\n @full_name ||= \"#{parent_name}#{pretty_name}\"\n end", "def full_name=(full_name)\n if full_name && full_name.is_a?(String)\n @full_name = full_name.strip\n end\n end", "def full_name\n @full_name ...
[ "0.68084794", "0.6526502", "0.6472931", "0.63895464", "0.6385919", "0.6383926", "0.63677394", "0.62995285", "0.6191512", "0.6166219", "0.6135703", "0.6093798", "0.6067636", "0.59743136", "0.59594524", "0.59574485", "0.5951344", "0.5927753", "0.5927753", "0.591872", "0.5914917...
0.6788913
1
Use this to ignore a CodeObject and all its children until found again (record_location is called). An ignored item will not be displayed in documentation. See github issue 55 The ignored status is temporary in order to allow implementation details to be hidden. At the end of processing a file RDoc allows all classes a...
def ignore return unless @track_visibility @ignored = true stop_doc end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ignore\n @ignore = true\n end", "def ignore\n @ignored = true\n self\n end", "def ignore\n @ignore = true\n end", "def ignore!\n self.ignored = true\n end", "def ignore!\n @should_ignore = true\n end", "def handle_ignore...
[ "0.664158", "0.6567855", "0.65090054", "0.63918513", "0.5984172", "0.5838993", "0.582529", "0.5726127", "0.5626205", "0.5626205", "0.5600208", "0.5516948", "0.5470223", "0.5469255", "0.5440799", "0.543675", "0.542803", "0.5424911", "0.53947747", "0.53881246", "0.5366682", "...
0.67749095
0
Has this class been ignored? See also ignore
def ignored? @ignored end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ignored?\n !!ignored\n end", "def ignored?()\n #This is a stub, used for indexing\n end", "def ignore?\n @should_ignore\n end", "def ignore?\n !!@ignore\n end", "def ignored?\n\t\treturn self.status == 'I'\n\tend", "def ignored?\r\n infoxml = get_inf...
[ "0.7837144", "0.77516586", "0.76709574", "0.76059896", "0.7299867", "0.71519107", "0.7125569", "0.71160454", "0.7103336", "0.70911515", "0.7005191", "0.6978224", "0.69552034", "0.6811386", "0.6723688", "0.6660152", "0.6556053", "0.65552473", "0.6553766", "0.6466385", "0.64630...
0.8006074
0
The options instance from the store this CodeObject is attached to, or a default options instance if the CodeObject is not attached. This is used by Textsnippet
def options if @store and @store.rdoc then @store.rdoc.options else RDoc::Options.new end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def options\n self[:options] || {}\n end", "def options\n @options ||= {}\n end", "def options\n @options ||= {}\n end", "def options\n @options ||= {}\n end", "def options\n @options ||= self.class.options\n end", "def options\n @options ||= Ope...
[ "0.7448118", "0.7390403", "0.7390403", "0.7390403", "0.73655325", "0.7348989", "0.73321354", "0.73321354", "0.73321354", "0.73058194", "0.72838944", "0.72838944", "0.7279473", "0.7279473", "0.72448945", "0.7234261", "0.72030586", "0.7202172", "0.7202172", "0.7202172", "0.7189...
0.7055786
27
Our parent CodeObject. The parent may be missing for classes loaded from legacy RI data stores.
def parent return @parent if @parent return nil unless @parent_name if @parent_class == RDoc::TopLevel then @parent = @store.add_file @parent_name else @parent = @store.find_class_or_module @parent_name return @parent if @parent begin @parent = @store.load_class @paren...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def superclass\n\t\t\t\treturn Object\n\t\t\tend", "def superclass() end", "def base_class; end", "def __getobj__\n raise \"Abstract class requires implementation\"\n end", "def super_class; end", "def super_class; end", "def visit(_bytecode)\n raise NotImplementedError, 'subclass re...
[ "0.66250205", "0.6190699", "0.6023492", "0.5956874", "0.59234774", "0.59234774", "0.5825579", "0.581226", "0.5792606", "0.578336", "0.57132065", "0.56773573", "0.56683296", "0.5646055", "0.56358075", "0.56312215", "0.56050766", "0.5601312", "0.5601312", "0.5577685", "0.555096...
0.5633682
15
File name of our parent
def parent_file_name @parent ? @parent.base_name : '(unknown)' end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def path_name\n @parent ? \"#{@parent.path_name}.#{name}\" : name\n end", "def parent_name\n parent_info && parent_info.name\n end", "def file_name\n @file_name ||= File.basename tree\n end", "def parent_name\n @parent ? @parent.full_name : '(unknown)'\n end", "def path\n ...
[ "0.79054874", "0.7803578", "0.77438533", "0.75393295", "0.7515687", "0.7515687", "0.74770224", "0.74574786", "0.73754835", "0.73621297", "0.7339272", "0.72637635", "0.72637635", "0.7241444", "0.7241227", "0.72338027", "0.7212561", "0.7177908", "0.7176298", "0.7176298", "0.717...
0.8858213
0
Name of our parent
def parent_name @parent ? @parent.full_name : '(unknown)' end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parent_name\n self.class.parent_name\n end", "def parent_name\n @parent_name || super\n end", "def parent_name\n @parent_name || super\n end", "def parent_name\n parent_info && parent_info.name\n end", "def name\n \"#{parent.name}:#{@name}\"\n end", "def pa...
[ "0.893862", "0.8826953", "0.8826953", "0.8742958", "0.8627543", "0.8277187", "0.80936414", "0.8066121", "0.8004472", "0.79662883", "0.79003716", "0.7862129", "0.78543097", "0.7790902", "0.77618665", "0.7759661", "0.7733849", "0.7733849", "0.7733849", "0.7733849", "0.7733849",...
0.8445777
5
Records the RDoc::TopLevel (file) where this code object was defined
def record_location top_level @ignored = false @suppressed = false @file = top_level end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def record_location container # :nodoc:\n case container\n when RDoc::ClassModule then\n @top_level.add_to_classes_or_modules container\n end\n\n container.record_location @top_level\n end", "def top_level\n return @top_level if defined? @top_level\n @top_level = self\n @top_level = @t...
[ "0.65922534", "0.630357", "0.630357", "0.6302853", "0.6173983", "0.6129661", "0.60189414", "0.60189414", "0.5997637", "0.5827134", "0.5788179", "0.57066196", "0.56725276", "0.5649496", "0.5649149", "0.55468374", "0.5508724", "0.55048376", "0.5487206", "0.5462741", "0.5458544"...
0.64239407
1
The section this CodeObject is in. Sections allow grouping of constants, attributes and methods inside a class or module.
def section return @section if @section @section = parent.add_section @section_title if parent end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def section; end", "def section\n section_test.section\n end", "def inspect\n \"#<#{self.class.name} sections=#{sections.inspect}>\"\n end", "def section(ident)\n @sections[ident]\n end", "def section\n @section || path_section\n end", "def section\n @section.call\n...
[ "0.72412115", "0.69248813", "0.69158536", "0.68433404", "0.66917837", "0.654136", "0.6525664", "0.6454849", "0.64459354", "0.64405435", "0.6391004", "0.63381314", "0.6334769", "0.63221663", "0.63142127", "0.62688464", "0.61445826", "0.6135771", "0.6133093", "0.6130843", "0.60...
0.60596496
21
Enable capture of documentation unless documentation has been turned off by :enddoc:
def start_doc return if @done_documenting @document_self = true @document_children = true @ignored = false @suppressed = false end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def no_doc!\n @controller.doc = false\n end", "def force_documentation=(value)\n @force_documentation = value unless @done_documenting\n end", "def suppress\n return unless @track_visibility\n\n @suppressed = true\n\n stop_doc\n end", "def hide_docs(command)\n def command.nod...
[ "0.69184923", "0.6744324", "0.66013277", "0.654167", "0.6404237", "0.6304002", "0.6304002", "0.6304002", "0.6304002", "0.62941706", "0.62912726", "0.62358963", "0.6011293", "0.6008145", "0.60033697", "0.59635115", "0.59635115", "0.5932532", "0.59269744", "0.59191436", "0.5916...
0.63689214
5
Disable capture of documentation
def stop_doc return unless @track_visibility @document_self = false @document_children = false end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def no_doc!\n @controller.doc = false\n end", "def suppress\n return unless @track_visibility\n\n @suppressed = true\n\n stop_doc\n end", "def hide_docs(command)\n def command.nodoc; true end\n end", "def ignore\n return unless @track_visibility\n\n @ignored = true\n\n...
[ "0.7284342", "0.71112174", "0.6899248", "0.6659372", "0.6381666", "0.627794", "0.6274023", "0.61739135", "0.6164939", "0.61410654", "0.6135094", "0.60595787", "0.6013611", "0.6002281", "0.5979415", "0.5979415", "0.5979415", "0.5979415", "0.5932555", "0.58761513", "0.5807949",...
0.6479231
4
Sets the +store+ that contains this CodeObject
def store= store @store = store return unless @track_visibility if :nodoc == options.visibility then initialize_visibility @track_visibility = false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def store=(store)\n @store = store\n end", "def set_store\n @store = Store.find(params[:id])\n end", "def set_store\n @store = Store.find(params[:id])\n end", "def set_store\n @store = Store.find(params[:store_id]) if params[:store_id]\n end", "def set_store\n ...
[ "0.8040644", "0.7505871", "0.7422335", "0.74086833", "0.738763", "0.738763", "0.738763", "0.738763", "0.738763", "0.738763", "0.738763", "0.738763", "0.738763", "0.72742736", "0.72191525", "0.72191525", "0.70783824", "0.70783824", "0.70783824", "0.70783824", "0.7051044", "0...
0.0
-1
Use this to suppress a CodeObject and all its children until the next file it is seen in or documentation is discovered. A suppressed item with documentation will be displayed while an ignored item with documentation may not be displayed.
def suppress return unless @track_visibility @suppressed = true stop_doc end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def suppressFor _obj, _args\n \"_obj suppressFor _args;\" \n end", "def suppress_parents container, ancestor # :nodoc:\n while container and container != ancestor do\n container.suppress unless container.documented?\n container = container.parent\n end\n end", "def ignore\n return u...
[ "0.60339737", "0.5573665", "0.551633", "0.53421336", "0.52866083", "0.51502496", "0.50797594", "0.5011505", "0.50084037", "0.5006844", "0.49836394", "0.4951168", "0.49488157", "0.49313483", "0.4897984", "0.48938555", "0.48476744", "0.48208204", "0.48037115", "0.47992763", "0....
0.6389329
0
Has this class been suppressed? See also suppress
def suppressed? @suppressed end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def suppressed? ; @suppressed ; end", "def suppress?\n !!@suppress\n end", "def suppressed?\n status == 'suppressed'\n end", "def safe_class?\n true\n end", "def suppressed?\n suppressions = {}\n SUPPRESSION_TYPES.each do |suppression_type|\n if response = f...
[ "0.7898519", "0.7360989", "0.70289624", "0.64034086", "0.63517404", "0.61518323", "0.61278176", "0.61037445", "0.6067363", "0.6058942", "0.60580117", "0.6048709", "0.60182196", "0.6007662", "0.5998639", "0.59736174", "0.59365475", "0.59365475", "0.5879158", "0.58771145", "0.5...
0.7598272
1
Creates a new Store of +type+ that will load or save to +path+
def initialize path = nil, type = nil @dry_run = false @encoding = nil @path = path @rdoc = nil @type = type @cache = { :ancestors => {}, :attributes => {}, :class_methods => {}, :c_class_variables =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new_store\n params = settings.dup\n params.delete(:store)\n \n cls = Store::const_get(settings[:store].to_s.camelize)\n\n cls.send(:new, params)\n end", "def store(type, file)\n require_writeable_layers!\n hash = store_immediately!(type, file)\n if layers.delayed.writeabl...
[ "0.698802", "0.6108453", "0.607768", "0.6012923", "0.60048425", "0.59166324", "0.5896306", "0.5863838", "0.57850456", "0.576745", "0.5687062", "0.5673929", "0.566875", "0.5602272", "0.5602062", "0.56011367", "0.55989724", "0.55913126", "0.55847335", "0.5575299", "0.55719274",...
0.0
-1
Adds +module+ as an enclosure (namespace) for the given +variable+ for C files.
def add_c_enclosure variable, namespace @c_enclosure_classes[variable] = namespace end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_c_enclosure variable\n @c_enclosure_classes.fetch variable do\n break unless name = @c_enclosure_names[variable]\n\n mod = find_class_or_module name\n\n unless mod then\n loaded_mod = load_class_data name\n\n file = loaded_mod.in_files.first\n\n return unless file # ...
[ "0.59923756", "0.5310309", "0.5237781", "0.50820434", "0.49416748", "0.48297203", "0.4819738", "0.47883487", "0.4763594", "0.4763594", "0.47365093", "0.4724286", "0.46746287", "0.46569163", "0.4633067", "0.46052158", "0.45877728", "0.45744836", "0.45671654", "0.4518215", "0.4...
0.73877895
0
Adds C variables from an RDoc::Parser::C
def add_c_variables c_parser filename = c_parser.top_level.relative_name @c_class_variables[filename] = make_variable_map c_parser.classes @c_singleton_class_variables[filename] = c_parser.singleton_classes end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cvars; end", "def C(*args)\n SyntaxNotes::C.build(*args)\n end", "def mk_var(name, rname, type, transform=\"\", files=@files)\n f_hash=Hash[*files.zip((1..files.length).to_a).flatten]\n defs=files.map do |file|\n \"DEF:#{name}#{f_hash[file]}=#{file}:#{rname}:#{type.to_s.upcase}\"\n end\n ...
[ "0.63654983", "0.56230503", "0.4940727", "0.4940727", "0.48861274", "0.48488587", "0.48291346", "0.48124877", "0.47860292", "0.47785884", "0.47785884", "0.47785884", "0.47785142", "0.47454843", "0.47454843", "0.47454843", "0.47449023", "0.47406796", "0.47361124", "0.4671221", ...
0.68964714
0
Adds the file with +name+ as an RDoc::TopLevel to the store. Returns the created RDoc::TopLevel.
def add_file absolute_name, relative_name: absolute_name, parser: nil unless top_level = @files_hash[relative_name] then top_level = RDoc::TopLevel.new absolute_name, relative_name top_level.parser = parser if parser top_level.store = self @files_hash[relative_name] = top_level @text_f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parent\n return @parent if @parent\n return nil unless @parent_name\n\n if @parent_class == RDoc::TopLevel then\n @parent = @store.add_file @parent_name\n else\n @parent = @store.find_class_or_module @parent_name\n\n return @parent if @parent\n\n begin\n @parent = @store....
[ "0.5423859", "0.5132116", "0.51007324", "0.5073897", "0.49871498", "0.4984639", "0.49543542", "0.49434578", "0.49279764", "0.48905352", "0.48858634", "0.4875402", "0.47696903", "0.47664303", "0.4719925", "0.4702363", "0.4702363", "0.46655524", "0.46452665", "0.46383527", "0.4...
0.6901851
0
Returns all classes discovered by RDoc
def all_classes @classes_hash.values end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def classes\n return @classes if @classes\n @classes = @context.classes.sort.find_all{|c| c.document_self}.collect{|c| R2Doc.all_references[c.full_name]}\n end", "def extract_rdoc_information_from_classes(classes, options, stats)\n result = []\n classes.each do |clzz|\n tp = r...
[ "0.77706355", "0.7187905", "0.6722927", "0.66516984", "0.66232246", "0.6396193", "0.63536775", "0.6347781", "0.62798935", "0.62798935", "0.6240566", "0.6184193", "0.61754346", "0.61233515", "0.6112356", "0.60882884", "0.60860103", "0.60603267", "0.602878", "0.6007965", "0.597...
0.52194065
93
Returns all classes and modules discovered by RDoc
def all_classes_and_modules @classes_hash.values + @modules_hash.values end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def classes\n return @classes if @classes\n @classes = @context.classes.sort.find_all{|c| c.document_self}.collect{|c| R2Doc.all_references[c.full_name]}\n end", "def extract_rdoc_information_from_classes(classes, options, stats)\n result = []\n classes.each do |clzz|\n tp = r...
[ "0.6853425", "0.67269045", "0.6610696", "0.65105456", "0.63719475", "0.62619483", "0.6203607", "0.6185587", "0.60787994", "0.60692954", "0.60575485", "0.6025259", "0.6009133", "0.5979443", "0.5906329", "0.5858862", "0.5852664", "0.581679", "0.57985294", "0.57914793", "0.57826...
0.0
-1
All TopLevels known to RDoc
def all_files @files_hash.values end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generate top_levels\n top_levels.each do |top_level|\n @tags[top_level.relative_name] << [top_level.relative_name, 0, 'F']\n end\n\n RDoc::TopLevel.all_classes_and_modules.each do |klass|\n kind = \"class:#{klass.full_name}\"\n\n address =\n unless RDoc::TopLevel === klass.parent...
[ "0.72328913", "0.6859068", "0.6514008", "0.6364748", "0.6360282", "0.6360282", "0.63112104", "0.591212", "0.587131", "0.5866752", "0.58327544", "0.5787204", "0.57568324", "0.57492906", "0.571472", "0.57033086", "0.5653205", "0.560305", "0.558233", "0.5565982", "0.55486405", ...
0.0
-1
Returns all modules discovered by RDoc
def all_modules modules_hash.values end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def modules\n return @modules if @modules\n @modules = @context.modules.sort.find_all{|m| m.document_self}.collect{|m| R2Doc.all_references[m.full_name]}\n end", "def installed_docs\n extra_counter = 0\n ri_paths.map do |path, type|\n store = RDoc::Store.new path, type\n exists = Fil...
[ "0.74386865", "0.6886542", "0.66262615", "0.65356034", "0.6376011", "0.63594383", "0.6293822", "0.6291316", "0.6221488", "0.6218098", "0.62078154", "0.6161819", "0.6161819", "0.6161819", "0.6144312", "0.61137927", "0.6092808", "0.6061701", "0.5928129", "0.59095246", "0.588370...
0.57179505
33
Ancestors cache accessor. Maps a klass name to an Array of its ancestors in this store. If Foo in this store inherits from Object, Kernel won't be listed (it will be included from ruby's ri store).
def ancestors @cache[:ancestors] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ancestors_of klass\n ancestors = []\n unexamined = [klass]\n seen = []\n loop do\n break if unexamined.empty?\n current = unexamined.shift\n seen << current\n stores = classes[current]\n break unless stores and not stores.empty?\n klasses = stores.map do |store|\n ...
[ "0.75889397", "0.7535513", "0.6811999", "0.6803479", "0.66037554", "0.65610814", "0.6537176", "0.652449", "0.64780515", "0.6334887", "0.62973607", "0.62943906", "0.6273757", "0.62339586", "0.6233693", "0.6228006", "0.618503", "0.6181111", "0.6176783", "0.61523086", "0.6147317...
0.7122019
2
Attributes cache accessor. Maps a class to an Array of its attributes.
def attributes @cache[:attributes] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def attributes\n if self.class_variable_defined?(:@@attributes)\n class_variable_get(:@@attributes)\n else\n class_variable_set(:@@attributes, [])\n class_variable_get(:@@attributes)\n end\n end", "def class_attributes; end", "def attributes_ge...
[ "0.6681912", "0.6434408", "0.63438463", "0.63438463", "0.63154274", "0.62968355", "0.62254024", "0.6222899", "0.6217485", "0.62075", "0.61818427", "0.6152956", "0.6143708", "0.6138454", "0.61303633", "0.60409003", "0.6040792", "0.6040215", "0.60276216", "0.60250926", "0.60234...
0.69311607
0
Path to the cache file
def cache_path File.join @path, 'cache.ri' end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cache_file_path\n File.join @homepath, 'cache'\n end", "def cache_file_path\n raise IOError.new 'Write permission is required for cache directory' unless File.writable?(@args[:cache_directory])\n \"#{@args[:cache_directory]}/#{Digest::SHA1.hexdigest((@args[:cache_ref] || @path).to_s + size.to_s...
[ "0.87018466", "0.8633223", "0.8408036", "0.8357555", "0.8351534", "0.83107173", "0.8289507", "0.80825937", "0.8019645", "0.8019645", "0.7931004", "0.7903449", "0.789348", "0.78407645", "0.7836235", "0.77696294", "0.7714945", "0.7710464", "0.7696215", "0.7696215", "0.76450497"...
0.88388294
0
Path to the ri data for +klass_name+
def class_file klass_name name = klass_name.split('::').last File.join class_path(klass_name), "cdesc-#{name}.ri" end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def class_path klass_name\n File.join @path, *klass_name.split('::')\n end", "def inspect\n relative = directory.relative_path_from(Atlas.data_dir)\n \"#<#{ self.class.name } (#{ @klass.name } at ./#{ relative })>\"\n end", "def data_path(filetype)\n \"#{@datapath}.#{filetype}.txt\"\n...
[ "0.65797615", "0.6398148", "0.61952424", "0.6165553", "0.61418724", "0.61347663", "0.61235255", "0.61103517", "0.61063766", "0.6106273", "0.6072834", "0.60630435", "0.59360117", "0.59360117", "0.59012336", "0.58955866", "0.5865357", "0.5832254", "0.58270615", "0.582337", "0.5...
0.65533423
1
Class methods cache accessor. Maps a class to an Array of its class methods (not full name).
def class_methods @cache[:class_methods] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def methods(class_name)\n @methods[class_name] ||= []\n end", "def class_cacheable(*methods)\n methods.each do |method|\n # define singleton method instead of\n # instance method\n define_singleton_method cached_alias(method), ->(options = {}) do\n memoize method, o...
[ "0.7368807", "0.72481513", "0.70511305", "0.6819447", "0.6703714", "0.66442156", "0.6551533", "0.6551533", "0.6449628", "0.63763857", "0.6336017", "0.6314301", "0.6255578", "0.62401634", "0.62401634", "0.61913127", "0.6166112", "0.6166112", "0.61645126", "0.61645126", "0.6152...
0.831252
0
Path where data for +klass_name+ will be stored (methods or class data)
def class_path klass_name File.join @path, *klass_name.split('::') end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def path(klass)\n return @@path[klass] if defined?(@@path)\n end", "def load_data folder, klass\n\tDir.entries(\"data/#{folder}\").each do |e|\n\t\tnext unless e =~ /^(\\w[\\w\\d]+)\\.rb$/i\n\n\t\tname = $1\n\t\tname[0] = name[0].upcase\n\n\t\tObject.__send__(:eval,\n\t\t\t\t\"class #{name} < #{klass}\\r...
[ "0.6525109", "0.62933546", "0.61798733", "0.61730635", "0.61264", "0.60825026", "0.6064496", "0.60518485", "0.59883225", "0.59650785", "0.5954526", "0.59542954", "0.5945525", "0.5937915", "0.5916441", "0.59138614", "0.590547", "0.5871943", "0.58397806", "0.5819223", "0.579851...
0.7211238
0
Hash of all classes known to RDoc
def classes_hash @classes_hash end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def classes_hash\n @classes\n end", "def classes_hash\n @classes\n end", "def classes\n return @classes if @classes\n @classes = @context.classes.sort.find_all{|c| c.document_self}.collect{|c| R2Doc.all_references[c.full_name]}\n end", "def index_classes\n debug_msg \" generating cla...
[ "0.6640775", "0.6640775", "0.6598539", "0.6265488", "0.6239485", "0.61626214", "0.6162076", "0.6121095", "0.60657305", "0.5930423", "0.5919617", "0.5919617", "0.5896045", "0.5870028", "0.58562386", "0.58492595", "0.58447903", "0.58086145", "0.578472", "0.577376", "0.57678324"...
0.6375995
3
Removes empty items and ensures item in each collection are unique and sorted
def clean_cache_collection collection # :nodoc: collection.each do |name, item| if item.empty? then collection.delete name else # HACK mongrel-1.1.5 documents its files twice item.uniq! item.sort! end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clean_all\n [@vc_primary, @vc_complement, @hc_between_strands].collect { |a| a.delete(nil); a.uniq!; a.sort! }\n end", "def without_empty_sets\n collection = clone\n collection.sets.reject!(&:empty?)\n collection\n end", "def clean_result_set(result_set)\n result_set.each do |set|\...
[ "0.65663195", "0.6229257", "0.6037075", "0.5963349", "0.5895557", "0.58557683", "0.5849499", "0.5835049", "0.5814588", "0.57962906", "0.5750182", "0.57489645", "0.56874555", "0.56844425", "0.5669692", "0.56357354", "0.56310135", "0.5582487", "0.55762666", "0.5526191", "0.5510...
0.70212346
0
Prepares the RDoc code object tree for use by a generator. It finds unique classes/modules defined, and replaces classes/modules that are aliases for another one by a copy with RDoc::ClassModuleis_alias_for set. It updates the RDoc::ClassModuleconstant_aliases attribute of "real" classes or modules. It also completely ...
def complete min_visibility fix_basic_object_inheritance # cache included modules before they are removed from the documentation all_classes_and_modules.each { |cm| cm.ancestors } unless min_visibility == :nodoc then remove_nodoc @classes_hash remove_nodoc @modules_hash end @uniqu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_aliases\n constants.each do |const|\n next unless cm = const.is_alias_for\n cm_alias = cm.dup\n cm_alias.name = const.name\n\n # Don't move top-level aliases under Object, they look ugly there\n unless RDoc::TopLevel === cm_alias.parent then\n cm_alias.parent = self\n ...
[ "0.58852464", "0.5737344", "0.5726669", "0.5658102", "0.54212147", "0.5352033", "0.53063774", "0.5221684", "0.51459706", "0.5100748", "0.5089873", "0.50336593", "0.49644744", "0.48975402", "0.4871612", "0.4806578", "0.47760075", "0.47613516", "0.47612768", "0.4718335", "0.471...
0.6536966
0
Hash of all files known to RDoc
def files_hash @files_hash end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def contents_hash(paths)\n return if paths.nil?\n\n paths = paths.compact.select { |path| File.file?(path) }\n return if paths.empty?\n # rubocop:disable GitHub/InsecureHashAlgorithm\n paths.sort\n .reduce(Digest::XXHash64.new, :file)\n .digest\n ...
[ "0.6779805", "0.67443764", "0.6553078", "0.65209043", "0.65180993", "0.64752895", "0.6441488", "0.62184227", "0.6196017", "0.6195783", "0.6190548", "0.6183581", "0.6179027", "0.61653966", "0.6152399", "0.61393946", "0.60976446", "0.60283273", "0.5995774", "0.5983795", "0.5937...
0.6323369
7
Finds the enclosure (namespace) for the given C +variable+.
def find_c_enclosure variable @c_enclosure_classes.fetch variable do break unless name = @c_enclosure_names[variable] mod = find_class_or_module name unless mod then loaded_mod = load_class_data name file = loaded_mod.in_files.first return unless file # legacy data sour...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_c_enclosure variable, namespace\n @c_enclosure_classes[variable] = namespace\n end", "def find_variable(variable)\n for scope in $current_scope_list.sort{|a, b| b <=> a}\n if $var_list[scope][variable] != nil\n return $var_list[scope][variable]\n end\n end\n return nil\nend", "def fin...
[ "0.66676575", "0.5970893", "0.54472905", "0.54415524", "0.5383385", "0.52560425", "0.5082416", "0.4958836", "0.49177906", "0.49113032", "0.4837826", "0.4815892", "0.47999224", "0.47778493", "0.47493145", "0.4683521", "0.46414113", "0.4623866", "0.46187913", "0.46140695", "0.4...
0.70234823
0
Finds the class with +name+ in all discovered classes
def find_class_named name @classes_hash[name] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def findClassesThatMatch(name)\n fname = name.tr(':', '_')\n return ClassIndex.findClasses(fname)\n end", "def find_class_named name\n return self if full_name == name\n return self if @name == name\n\n @classes.values.find do |klass|\n next if klass == self\n klass.find_class_named nam...
[ "0.8362125", "0.8326636", "0.7926375", "0.7753255", "0.76155007", "0.75412375", "0.74002486", "0.732102", "0.7217042", "0.7084712", "0.7070232", "0.7025775", "0.6968457", "0.6968457", "0.686505", "0.685565", "0.68185836", "0.6622201", "0.65959173", "0.6576006", "0.65689147", ...
0.8221833
2
Finds the class with +name+ starting in namespace +from+
def find_class_named_from name, from from = find_class_named from unless RDoc::Context === from until RDoc::TopLevel === from do return nil unless from klass = from.find_class_named name return klass if klass from = from.parent end find_class_named name end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def findClassesThatMatch(name)\n fname = name.tr(':', '_')\n return ClassIndex.findClasses(fname)\n end", "def class_for_name qualified_name\n raise unless ::Class === (resolved = ::Object.const_get qualified_name, false)\n resolved\n rescue\n raise ::NameError, %(Could not resolve class for nam...
[ "0.682219", "0.64571804", "0.6410625", "0.6410625", "0.6389244", "0.63577074", "0.6218716", "0.6218716", "0.6185452", "0.6171018", "0.6125453", "0.6100683", "0.58779716", "0.5863391", "0.5862095", "0.5837981", "0.5827029", "0.5825761", "0.57708836", "0.57708836", "0.571787", ...
0.7700353
0
Finds the class or module with +name+
def find_class_or_module name name = $' if name =~ /^::/ @classes_hash[name] || @modules_hash[name] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_module_named(name)\n find_class_or_module(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_named(name)\n res = @modules[name] || @cl...
[ "0.851757", "0.80892485", "0.80892485", "0.8015411", "0.7956763", "0.7954112", "0.769395", "0.7673879", "0.7598776", "0.75523037", "0.7471542", "0.7441325", "0.7378742", "0.735409", "0.73235846", "0.731368", "0.7289643", "0.7225302", "0.7175422", "0.71188915", "0.7092273", ...
0.8027397
3
Finds the file with +name+ in all discovered files
def find_file_named name @files_hash[name] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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_named(name)\n top_level.class.find_file_named(name)\n end", "def find(name)\n if name\n ...
[ "0.78884035", "0.7703379", "0.7369478", "0.72845614", "0.7204577", "0.7133781", "0.7098961", "0.7087227", "0.70454985", "0.69613004", "0.68303704", "0.6791847", "0.6766638", "0.67246103", "0.6671436", "0.6665992", "0.66374934", "0.66065747", "0.65896124", "0.65274316", "0.652...
0.7569573
2
Finds the module with +name+ in all discovered modules
def find_module_named name @modules_hash[name] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_module_named(name)\n find_class_or_module(name)\n end", "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 == ...
[ "0.8268063", "0.79930586", "0.7881919", "0.7881919", "0.76764584", "0.7352992", "0.7226708", "0.6934908", "0.674151", "0.674151", "0.6617704", "0.66111284", "0.658574", "0.6558896", "0.65401536", "0.6532012", "0.65232885", "0.6474098", "0.6446762", "0.6440646", "0.6431954", ...
0.8200641
1
Returns the RDoc::TopLevel that is a text file and has the given +file_name+
def find_text_page file_name @text_files_hash.each_value.find do |file| file.full_name == file_name end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_text(filename); end", "def get_template_from_file(file_path)\n template_text = nil\n\n File.open(file_path, 'r') do |f_in|\n template_text = f_in.read\n end\n\n return template_text\n end", "def file= location\n @file = case location\n when RDoc::TopLevel then\n ...
[ "0.58314425", "0.57373124", "0.567836", "0.56720614", "0.5627927", "0.55370164", "0.5479148", "0.54373497", "0.54015565", "0.5325557", "0.5230398", "0.5215096", "0.5207068", "0.51934093", "0.51804686", "0.51227933", "0.51188093", "0.508861", "0.50667214", "0.50570476", "0.504...
0.53738225
9
Finds unique classes/modules defined in +all_hash+, and returns them as an array. Performs the alias updates in +all_hash+: see ::complete. TODO aliases should be registered by Contextadd_module_alias
def find_unique all_hash unique = [] all_hash.each_pair do |full_name, cm| unique << cm if full_name == cm.full_name end unique end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def all_classes_and_modules\n @classes_hash.values + @modules_hash.values\n end", "def all_modules\n modules_hash.values\n end", "def unregister_all(timeout = nil)\n $log.debug \"Unregistering all modules...\"\n # clone to avoid editing whilst iterating\n unregister_modules(timeout, *@mo...
[ "0.6425059", "0.63262385", "0.6163837", "0.59428614", "0.5919253", "0.5890115", "0.58559173", "0.58383906", "0.5834259", "0.5757773", "0.560932", "0.5552664", "0.5542412", "0.5527176", "0.5469442", "0.5446792", "0.5424215", "0.5419713", "0.53998506", "0.535129", "0.5295385", ...
0.5015442
50
Fixes the erroneous BasicObject in 1.9. Because we assumed all classes without a stated superclass inherit from Object, we have the above wrong inheritance. We fix BasicObject right away if we are running in a Ruby version >= 1.9.
def fix_basic_object_inheritance basic = classes_hash['BasicObject'] return unless basic basic.superclass = nil end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def plain_old_ruby_object\n\t\treturn false\n\tend", "def inherited(_sub)\n raise Error, \"cannot subclass #{self}\" unless self == Object\n end", "def full_object\n fail NotImplementedError\n end", "def vanilla_object(object)\n type = get_type(object)\n\n # I wanted to ...
[ "0.5741096", "0.56452936", "0.5458121", "0.5393273", "0.53626984", "0.5278765", "0.5227786", "0.52262604", "0.5226219", "0.521043", "0.52088386", "0.5185574", "0.5182978", "0.50443745", "0.5038706", "0.503205", "0.50232995", "0.5015278", "0.50108755", "0.49704614", "0.4915852...
0.8524549
0
Friendly rendition of path
def friendly_path case type when :gem then parent = File.expand_path '..', @path "gem #{File.basename parent}" when :home then RDoc.home when :site then 'ruby site' when :system then 'ruby core' else @path end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def showpath(uri)\n return escape(docpath(uri))\n end", "def full_path; end", "def path\n return @path.sub(/^\\//,'').sub(/^%2F/,'/')\n end", "def path_expanded path\n end", "def path\n self.slug == '' ? '/' : \"/#{self.slug}\".gsub('//', '/')\n end", "def full_path\n path\n end", ...
[ "0.7268227", "0.70368564", "0.6956968", "0.68903494", "0.68457925", "0.68436074", "0.68373996", "0.6782674", "0.67714185", "0.67714185", "0.67714185", "0.67707515", "0.674586", "0.6742096", "0.6683612", "0.6676188", "0.66536766", "0.6619804", "0.6613983", "0.6601557", "0.6587...
0.0
-1
Instance methods cache accessor. Maps a class to an Array of its instance methods (not full name).
def instance_methods @cache[:instance_methods] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def class_methods\n @cache[:class_methods]\n end", "def methods(class_name)\n @methods[class_name] ||= []\n end", "def class_cacheable(*methods)\n methods.each do |method|\n # define singleton method instead of\n # instance method\n define_singleton_method cached_alias...
[ "0.8131662", "0.7183685", "0.71239877", "0.6893941", "0.6893941", "0.67751074", "0.6651492", "0.6573809", "0.6561881", "0.6538514", "0.65216184", "0.6471402", "0.643188", "0.642963", "0.642963", "0.64240986", "0.63592434", "0.6351695", "0.63327974", "0.6312381", "0.6307573", ...
0.79466593
1
Loads all items from this store into memory. This recreates a documentation tree for use by a generator
def load_all load_cache module_names.each do |module_name| mod = find_class_or_module(module_name) || load_class(module_name) # load method documentation since the loaded class/module does not have # it loaded_methods = mod.method_list.map do |method| load_method module_name, m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reload\n begin_reset_model\n clear\n\n @items_to_models = Hash.new\n @models_to_items = Hash.new\n @names_to_item = Hash.new\n @items_metadata = Hash[self => Metadata.new([], [], Set.new)]\n @resolver_from_...
[ "0.6135298", "0.61340934", "0.59995776", "0.59483975", "0.5869361", "0.57573235", "0.5756101", "0.5756101", "0.5756101", "0.57206476", "0.57142895", "0.5682974", "0.56717545", "0.5662812", "0.5628133", "0.5615896", "0.5577648", "0.55303633", "0.5521448", "0.5506916", "0.55048...
0.6072138
2
Loads cache file for this store
def load_cache #orig_enc = @encoding File.open cache_path, 'rb' do |io| @cache = Marshal.load io.read end load_enc = @cache[:encoding] # TODO this feature will be time-consuming to add: # a) Encodings may be incompatible but transcodeable # b) Need to warn in the appropriate spots, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_cache\n @load_cache\n end", "def load\n if File.exist?(@file_path)\n\n @_cache = JSON File.open(@file_path, &:read).strip\n else\n $stderr.puts \"#{@file_path} does not exist\"\n end\n end", "def read_cache\n @cache_file ...
[ "0.7574749", "0.7430702", "0.7324594", "0.7205667", "0.71686673", "0.71621275", "0.7129377", "0.7071761", "0.7044742", "0.703622", "0.7019633", "0.69126403", "0.6855205", "0.6817629", "0.67752165", "0.67273855", "0.66254205", "0.6616263", "0.6598315", "0.652862", "0.6520339",...
0.6607837
18
Loads ri data for +klass_name+ and hooks it up to this store.
def load_class klass_name obj = load_class_data klass_name obj.store = self case obj when RDoc::NormalClass then @classes_hash[klass_name] = obj when RDoc::SingleClass then @classes_hash[klass_name] = obj when RDoc::NormalModule then @modules_hash[klass_name] = obj end ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_data folder, klass\n\tDir.entries(\"data/#{folder}\").each do |e|\n\t\tnext unless e =~ /^(\\w[\\w\\d]+)\\.rb$/i\n\n\t\tname = $1\n\t\tname[0] = name[0].upcase\n\n\t\tObject.__send__(:eval,\n\t\t\t\t\"class #{name} < #{klass}\\r\\n\" + \n\t\t\t\t\tFile.read(\"data/#{folder}/#{e}\") +\n\t\t\t\t\"\\r\\nend\...
[ "0.6155781", "0.6072916", "0.60499614", "0.6028221", "0.58985436", "0.56957173", "0.56132984", "0.5598919", "0.556398", "0.5533309", "0.5519048", "0.5496691", "0.5450486", "0.5441939", "0.54187536", "0.5413466", "0.5373365", "0.5361644", "0.5359237", "0.53540564", "0.53341734...
0.6678763
0
Loads ri data for +klass_name+
def load_class_data klass_name file = class_file klass_name File.open file, 'rb' do |io| Marshal.load io.read end rescue Errno::ENOENT => e error = MissingFileError.new(self, file, klass_name) error.set_backtrace e.backtrace raise error end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_data folder, klass\n\tDir.entries(\"data/#{folder}\").each do |e|\n\t\tnext unless e =~ /^(\\w[\\w\\d]+)\\.rb$/i\n\n\t\tname = $1\n\t\tname[0] = name[0].upcase\n\n\t\tObject.__send__(:eval,\n\t\t\t\t\"class #{name} < #{klass}\\r\\n\" + \n\t\t\t\t\tFile.read(\"data/#{folder}/#{e}\") +\n\t\t\t\t\"\\r\\nend\...
[ "0.6797152", "0.67444324", "0.66648537", "0.63371986", "0.6177387", "0.607599", "0.6058523", "0.60346216", "0.60262007", "0.59781075", "0.5958533", "0.5943273", "0.5934006", "0.5892798", "0.5855102", "0.5832116", "0.5825779", "0.58219427", "0.58219427", "0.58219427", "0.58093...
0.686938
0
Loads ri data for +method_name+ in +klass_name+
def load_method klass_name, method_name file = method_file klass_name, method_name File.open file, 'rb' do |io| obj = Marshal.load io.read obj.store = self obj.parent = find_class_or_module(klass_name) || load_class(klass_name) unless obj.parent obj end rescue Er...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load(data)\n raise NoMethodError, \"#{__method__} not defined for #{self.class.name}\"\n end", "def method_missing(meth, *args, &block)\n (ARRAY.respond_to?(meth) ? @instance.send(:load_associated_objects, @reflection, @reload) : @instance.send(@reflection.dataset_method)).\n send...
[ "0.6718623", "0.6208084", "0.61194766", "0.58668804", "0.5803879", "0.5800556", "0.5777147", "0.5738641", "0.57275915", "0.5682509", "0.56597227", "0.5645698", "0.5627575", "0.5625577", "0.56137097", "0.5566565", "0.5559852", "0.55533004", "0.5532573", "0.55297905", "0.549531...
0.66475266
1
Loads ri data for +page_name+
def load_page page_name file = page_file page_name File.open file, 'rb' do |io| obj = Marshal.load io.read obj.store = self obj end rescue Errno::ENOENT => e error = MissingFileError.new(self, file, page_name) error.set_backtrace e.backtrace raise error end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def page_load; end", "def initialize( name )\n @name = name\n get_page_content\n get_total\n end", "def load_page\n @page = Regulate::Page.find(params[:id])\n end", "def load(name)\n render_rhtml [\"#{name}.rhtml\"]\n return \"\"\n end", "def import_page_data\n page_js...
[ "0.6512694", "0.64271444", "0.6277201", "0.620559", "0.61829495", "0.60873634", "0.60027164", "0.6002023", "0.5995421", "0.5878794", "0.5860291", "0.5847734", "0.582907", "0.5828641", "0.5815266", "0.5779067", "0.5766289", "0.57559127", "0.575576", "0.57297695", "0.568748", ...
0.62031704
4
Gets the main page for this RDoc store. This page is used as the root of the RDoc server.
def main @cache[:main] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def root_page\n @root_page ||= Page.language_root(session[:language])\n end", "def root_page\n sitemap.find_resource_by_path(config.index_file)\n end", "def main_url\n @main_page = @options.main_page\n @main_page_ref = nil\n if @main_page\n @main_page_ref = RDoc::Generator::AllReferences[...
[ "0.6590608", "0.6506534", "0.63851297", "0.6327776", "0.62091506", "0.6143337", "0.60525197", "0.60525197", "0.6017502", "0.6002896", "0.59605616", "0.5928173", "0.5855003", "0.58404213", "0.5816721", "0.5800165", "0.5782615", "0.5774288", "0.5763259", "0.57613873", "0.575644...
0.0
-1
Sets the main page for this RDoc store.
def main= page @cache[:main] = page end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_page\n end", "def set_main_page\n @main_page = MainPage.find(params[:id])\n end", "def set_mainpage\n @mainpage = Mainpage.find(params[:id])\n end", "def set_resource_content\n @page = Page.available.homepage.first!\n end", "def set_resource\n @page = current_site....
[ "0.70743203", "0.70540124", "0.68376154", "0.63852084", "0.630737", "0.6219621", "0.6119564", "0.6111698", "0.6091165", "0.6071464", "0.59992045", "0.5938191", "0.5918601", "0.5887986", "0.58404833", "0.58404833", "0.58404833", "0.58404833", "0.58404833", "0.58404833", "0.584...
0.6065921
10
Converts the variable => ClassModule map +variables+ from a C parser into a variable => class name map.
def make_variable_map variables map = {} variables.each { |variable, class_module| map[variable] = class_module.full_name } map end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_c_variables c_parser\n filename = c_parser.top_level.relative_name\n\n @c_class_variables[filename] = make_variable_map c_parser.classes\n\n @c_singleton_class_variables[filename] = c_parser.singleton_classes\n end", "def load_variable_map map_name\n return {} unless files = @store.cache[map...
[ "0.71454465", "0.6784048", "0.5751651", "0.5751651", "0.5690608", "0.5690608", "0.5556795", "0.55443233", "0.54735833", "0.5449288", "0.5438081", "0.5272651", "0.51898605", "0.51898605", "0.5119557", "0.5099105", "0.50935453", "0.50884414", "0.5050463", "0.5032265", "0.497944...
0.7379361
0