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.



346
347
348
349
350
# File 'lib/review/preprocessor.rb', line 346

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

Instance Method Details

#fetch(file, type, name) ⇒ Object



360
361
362
363
# File 'lib/review/preprocessor.rb', line 360

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

#fetch_file(file) ⇒ Object



352
353
354
# File 'lib/review/preprocessor.rb', line 352

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

#fetch_range(file, name) ⇒ Object



356
357
358
# File 'lib/review/preprocessor.rb', line 356

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