Class: ReVIEW::Repository

Inherits:
Object show all
Includes:
ErrorUtils, TextUtils
Defined in:
lib/review/preprocessor.rb

Instance Method Summary collapse

Methods included from ErrorUtils

#error, #filename, #init_ErrorUtils, #lineno, #location, #warn

Methods included from TextUtils

#detab, #split_paragraph

Constructor Details

#initialize(param) ⇒ Repository

Returns a new instance of Repository.



368
369
370
371
# File 'lib/review/preprocessor.rb', line 368

def initialize(param)
  @repository = {}
  @config = param
end

Instance Method Details

#fetch(file, type, name) ⇒ Object



381
382
383
384
# File 'lib/review/preprocessor.rb', line 381

def fetch(file, type, name)
  table = file_descripter(file)[type] or return nil
  table[name]
end

#fetch_file(file) ⇒ Object



373
374
375
# File 'lib/review/preprocessor.rb', line 373

def fetch_file(file)
  file_descripter(file)['file']
end

#fetch_range(file, name) ⇒ Object



377
378
379
# File 'lib/review/preprocessor.rb', line 377

def fetch_range(file, name)
  fetch(file, 'range', name)
end