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

#add_space?, #detab, #join_lines_to_paragraph, #split_paragraph

Constructor Details

#initialize(param) ⇒ Repository



329
330
331
332
333
# File 'lib/review/preprocessor.rb', line 329

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

Instance Method Details

#fetch(file, type, name) ⇒ Object



343
344
345
346
# File 'lib/review/preprocessor.rb', line 343

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

#fetch_file(file) ⇒ Object



335
336
337
# File 'lib/review/preprocessor.rb', line 335

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

#fetch_range(file, name) ⇒ Object



339
340
341
# File 'lib/review/preprocessor.rb', line 339

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