Class: I18nChecker::Cache::Files
- Inherits:
-
Object
- Object
- I18nChecker::Cache::Files
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/i18n_checker/cache.rb
Instance Attribute Summary collapse
-
#files ⇒ Object
readonly
Returns the value of attribute files.
Instance Method Summary collapse
-
#initialize(files = {}) ⇒ Files
constructor
A new instance of Files.
- #read(file) ⇒ Object
Constructor Details
#initialize(files = {}) ⇒ Files
Returns a new instance of Files.
14 15 16 |
# File 'lib/i18n_checker/cache.rb', line 14 def initialize(files = {}) @files = files end |
Instance Attribute Details
#files ⇒ Object (readonly)
Returns the value of attribute files.
10 11 12 |
# File 'lib/i18n_checker/cache.rb', line 10 def files @files end |
Instance Method Details
#read(file) ⇒ Object
18 19 20 21 22 |
# File 'lib/i18n_checker/cache.rb', line 18 def read(file) return files[file] if files.key?(file) files[file] = I18nChecker::Cache::File.of(file) files[file] end |