Class: CrudInspector::Files::Writer
- Inherits:
-
Object
- Object
- CrudInspector::Files::Writer
- Defined in:
- lib/crud_inspector/files/writer.rb
Instance Method Summary collapse
-
#initialize(options, repo) ⇒ Writer
constructor
A new instance of Writer.
- #write ⇒ Object
Constructor Details
#initialize(options, repo) ⇒ Writer
Returns a new instance of Writer.
4 5 6 7 |
# File 'lib/crud_inspector/files/writer.rb', line 4 def initialize(, repo) @options = @repo = repo end |
Instance Method Details
#write ⇒ Object
9 10 11 12 |
# File 'lib/crud_inspector/files/writer.rb', line 9 def write retries ||= 0 File.open(filepath, 'w') { |f| f.write(content) } end |