Class: RDoc::Server::FileChanges
Do not use. This class is for internal use only.
| Relationships & Source Files | |
| Inherits: | Object |
| Defined in: | lib/rdoc/server.rb |
Class Method Summary
- .new(rdoc) ⇒ FileChanges constructor
Instance Attribute Summary
- #changed_files readonly
- #reload_rbs_signatures? ⇒ Boolean readonly
- #removed_files readonly
- #source_files_changed? ⇒ Boolean readonly
Instance Method Summary
Constructor Details
.new(rdoc) ⇒ FileChanges
# File 'lib/rdoc/server.rb', line 61
def initialize(rdoc) @rdoc = rdoc @changed_files = [] @removed_files = [] @reload_rbs_signatures = false end
Instance Attribute Details
#changed_files (readonly)
[ GitHub ]# File 'lib/rdoc/server.rb', line 59
attr_reader :changed_files, :removed_files
#reload_rbs_signatures? ⇒ Boolean (readonly)
[ GitHub ]
# File 'lib/rdoc/server.rb', line 78
def reload_rbs_signatures? @reload_rbs_signatures end
#removed_files (readonly)
[ GitHub ]# File 'lib/rdoc/server.rb', line 59
attr_reader :changed_files, :removed_files
#source_files_changed? ⇒ Boolean (readonly)
[ GitHub ]
# File 'lib/rdoc/server.rb', line 82
def source_files_changed? !changed_files.empty? || !removed_files.empty? end
Instance Method Details
#record_changed(file)
[ GitHub ]# File 'lib/rdoc/server.rb', line 68
def record_changed(file) reload_rbs_signatures_if_needed file changed_files << file end
#record_removed(file)
[ GitHub ]# File 'lib/rdoc/server.rb', line 73
def record_removed(file) reload_rbs_signatures_if_needed file removed_files << file end
#reload_rbs_signatures_if_needed(file) (private)
[ GitHub ]# File 'lib/rdoc/server.rb', line 88
def reload_rbs_signatures_if_needed(file) @reload_rbs_signatures = true if @rdoc.auto_discovered_rbs_signature_file?(file) end