Class: Cure::Configuration::FileHandler
- Inherits:
-
DefaultFileHandler
- Object
- DefaultFileHandler
- Cure::Configuration::FileHandler
- Defined in:
- lib/cure/config.rb
Instance Attribute Summary collapse
Attributes inherited from DefaultFileHandler
Instance Method Summary collapse
- #description ⇒ Object
-
#initialize(file, ref_name) ⇒ FileHandler
constructor
A new instance of FileHandler.
- #with_file(&_block) ⇒ Object
Constructor Details
#initialize(file, ref_name) ⇒ FileHandler
Returns a new instance of FileHandler.
151 152 153 154 |
# File 'lib/cure/config.rb', line 151 def initialize(file, ref_name) super(:file, ref_name) @file = file end |
Instance Attribute Details
#file ⇒ File
148 149 150 |
# File 'lib/cure/config.rb', line 148 def file @file end |
Instance Method Details
#description ⇒ Object
163 164 165 |
# File 'lib/cure/config.rb', line 163 def description File.basename(file) end |
#with_file(&_block) ⇒ Object
156 157 158 159 160 161 |
# File 'lib/cure/config.rb', line 156 def with_file(&_block) yield @file, @ref_name ensure @file&.close end |