Class: ReVIEW::Preprocessor::Repository
- Defined in:
- lib/review/preprocessor/repository.rb
Instance Attribute Summary
Attributes included from Loggable
Instance Method Summary collapse
- #fetch(file, type, name) ⇒ Object
- #fetch_file(file) ⇒ Object
- #fetch_range(file, name) ⇒ Object
-
#initialize(param) ⇒ Repository
constructor
A new instance of Repository.
Methods included from Loggable
#app_error, #debug, #error, #error!, #warn
Methods included from TextUtils
#add_space?, #detab, #join_lines_to_paragraph, #split_paragraph
Constructor Details
#initialize(param) ⇒ Repository
Returns a new instance of Repository.
18 19 20 21 22 23 |
# File 'lib/review/preprocessor/repository.rb', line 18 def initialize(param) @repository = {} @config = param @leave_content = nil @logger = ReVIEW.logger end |
Instance Method Details
#fetch(file, type, name) ⇒ Object
33 34 35 36 |
# File 'lib/review/preprocessor/repository.rb', line 33 def fetch(file, type, name) table = file_descripter(file)[type] or return nil table[name] end |
#fetch_file(file) ⇒ Object
25 26 27 |
# File 'lib/review/preprocessor/repository.rb', line 25 def fetch_file(file) file_descripter(file)['file'] end |
#fetch_range(file, name) ⇒ Object
29 30 31 |
# File 'lib/review/preprocessor/repository.rb', line 29 def fetch_range(file, name) fetch(file, 'range', name) end |