Class: RDoc::Server::FileChanges

Inherits:
Object
  • Object
show all
Defined in:
lib/rdoc/server.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rdoc) ⇒ FileChanges

Returns a new instance of FileChanges.



61
62
63
64
65
66
# 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_filesObject (readonly)

Returns the value of attribute changed_files.



59
60
61
# File 'lib/rdoc/server.rb', line 59

def changed_files
  @changed_files
end

#removed_filesObject (readonly)

Returns the value of attribute removed_files.



59
60
61
# File 'lib/rdoc/server.rb', line 59

def removed_files
  @removed_files
end

Instance Method Details

#record_changed(file) ⇒ Object



68
69
70
71
# File 'lib/rdoc/server.rb', line 68

def record_changed(file)
  reload_rbs_signatures_if_needed file
  changed_files << file
end

#record_removed(file) ⇒ Object



73
74
75
76
# File 'lib/rdoc/server.rb', line 73

def record_removed(file)
  reload_rbs_signatures_if_needed file
  removed_files << file
end

#reload_rbs_signatures?Boolean

Returns:

  • (Boolean)


78
79
80
# File 'lib/rdoc/server.rb', line 78

def reload_rbs_signatures?
  @reload_rbs_signatures
end

#source_files_changed?Boolean

Returns:

  • (Boolean)


82
83
84
# File 'lib/rdoc/server.rb', line 82

def source_files_changed?
  !changed_files.empty? || !removed_files.empty?
end