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.
20 21 22 23 24 25 |
# File 'lib/review/preprocessor/repository.rb', line 20 def initialize(param) @repository = {} @config = param @leave_content = nil @logger = ReVIEW.logger end |
Instance Method Details
#fetch(file, type, name) ⇒ Object
35 36 37 38 |
# File 'lib/review/preprocessor/repository.rb', line 35 def fetch(file, type, name) table = file_descripter(file)[type] or return nil table[name] end |
#fetch_file(file) ⇒ Object
27 28 29 |
# File 'lib/review/preprocessor/repository.rb', line 27 def fetch_file(file) file_descripter(file)['file'] end |
#fetch_range(file, name) ⇒ Object
31 32 33 |
# File 'lib/review/preprocessor/repository.rb', line 31 def fetch_range(file, name) fetch(file, 'range', name) end |